[Numpy-discussion] numarray cov function

Travis Oliphant oliphant.travis at ieee.org
Sun Aug 13 16:35:00 CDT 2006


John Hunter wrote:
> I was surprised to see that numarray.mlab.cov is returning a rank-0
> complex number when given two 1D arrays as inputs rather than the
> standard 2x2 covariance array I am used to seeing.  Is this a feature
> or a bug?  
>   
This was the old behavior of the Numeric cov function which numarray 
borrowed.  We changed the behavior of cov in NumPy because it makes more 
sense to return the full covariance matrix in this case.

-Travis





More information about the Numpy-discussion mailing list