title: Why does this array has no attribute 'log10'?
body: <p>I'm trying to calculate the log10 of an ndarray, but I'm getting the following error: AttributeError: 'float' object has no attribute 'log10', by doing some research I found that it has to do with the way python handles numeric values, but I still can't get why I'm getting this error.</p>
  
  <pre><code>&gt;&gt;&gt; hx[0:5,:]
  array([[0.0],
         [0.0],
         [0.0],
         [0.0],
         [0.0]], dtype=object)
  &gt;&gt;&gt; type(hx)
  &lt;class 'numpy.ndarray'&gt;
  &gt;&gt;&gt; type(hx[0,0])
  &lt;class 'float'&gt;
  &gt;&gt;&gt; test
  array([[ 0.],
         [ 0.],
         [ 0.]])
  &gt;&gt;&gt; type(test)
  &lt;class 'numpy.ndarray'&gt;
  &gt;&gt;&gt; type(test[0,0])
  &lt;class 'numpy.float64'&gt;
  &gt;&gt;&gt; np.log10(test)
  array([[-inf],
         [-inf],
         [-inf]])
  &gt;&gt;&gt; np.log10(hx[0:5,:])
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: 'float' object has no attribute 'log10'
  &gt;&gt;&gt; np.log10(np.float64(0))
  -inf
  &gt;&gt;&gt; np.log10([np.float64(0)])
  array([-inf])
  &gt;&gt;&gt; np.log10([[np.float64(0)]])
  array([[-inf]])
  &gt;&gt;&gt; np.log10(float(0))
  -inf
  &gt;&gt;&gt; np.log10([[float(0)]])
  array([[-inf]])
  </code></pre>
  
  <p>I thought the reason was that type(hx[0,0]) is a Python float class, but I was able to calculate the log10 of a float class as well. I'm pretty sure I'm supposed to cast some kind of value so it can be handled as a parameter for numpy.log10(), but I can't spot it.</p>