title: numpy.cov() exception: 'float' object has no attribute 'shape'
body: <p>I have a dataset for different plant species, and I separated each species into a different <code>np.array</code>.</p>
  
  <p>When trying to generate gaussian models out of these species, I had to calculate the means and covariance matrices for each different label. </p>
  
  <p>The problem is: when using <code>np.cov()</code> in one of the labels, the function raises the error "'float' object has no attribute 'shape'" and I can't really figure out where the problem is coming from. The exact line of code I'm using is the following:</p>
  
  <pre><code>covx = np.cov(label0, rowvar=False)
  </code></pre>
  
  <p>Where <code>label0</code> is a numpy ndarray of shape (50,3), where the columns represent different variables and each row is a different observation.</p>
  
  <p>The exact error trace is:</p>
  
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-81-277aa1d02ff0&gt; in &lt;module&gt;()
        2 
        3 # Get the covariances
  ----&gt; 4 np.cov(label0, rowvar=False)
  
  C:\Users\Matheus\Anaconda3\lib\site-packages\numpy\lib\function_base.py in cov(m, y, rowvar, bias, ddof, fweights, aweights)
     3062             w *= aweights
     3063 
  -&gt; 3064     avg, w_sum = average(X, axis=1, weights=w, returned=True)
     3065     w_sum = w_sum[0]
     3066 
  
  C:\Users\Matheus\Anaconda3\lib\site-packages\numpy\lib\function_base.py in average(a, axis, weights, returned)
     1143 
     1144     if returned:
  -&gt; 1145         if scl.shape != avg.shape:
     1146             scl = np.broadcast_to(scl, avg.shape).copy()
     1147         return avg, scl
  
  AttributeError: 'float' object has no attribute 'shape'
  </code></pre>
  
  <p>Any ideas of what is going wrong?</p>