title: TypeError: return arrays must be of ArrayType for a function that uses only floats
body: <p>This one really stumps me. I have a function that calculates the weight of a word, I've confirmed that both a and b local variables are of type float:</p>
  
  <pre><code>def word_weight(term):
      a = term_freq(term)
      print a, type(a)
      b = idf(term)
      print b, type(b)
      return a*log(b,2)
  </code></pre>
  
  <p>running word_weight("the") logs:</p>
  
  <pre><code>0.0208837518791 &lt;type 'float'&gt;
  6.04987801572 &lt;type 'float'&gt;
  Traceback (most recent call last):
    File "summary.py", line 59, in &lt;module&gt;
      print word_weight("the")
    File "summary.py", line 43, in word_weight
      return a*log(b,2)
  TypeError: return arrays must be of ArrayType
  </code></pre>
  
  <p>why?</p>