[Numpy-discussion] Example of numpy cov() not correct?

Pauli Virtanen pav@iki...
Thu Jul 31 03:14:10 CDT 2008


Wed, 30 Jul 2008 18:49:10 +0300, Nadav Horesh wrote:

> If you read the cov function documentation you'll see that if a second
> vector is given, it joins the 2 into one matrix and calculate the
> covariance of it. In your case, you are looking for the off-diagonal
> elements.

So the final answer to the OP's question is:

Yes, the example on

	http://www.scipy.org/Numpy_Example_List_With_Doc#cov

is wrong; cov(T,P) indeed returns a matrix. And it would be nice if 
someone fixed this, you can simply register a wiki account and fix the 
problem.

-- 
Pauli Virtanen



More information about the Numpy-discussion mailing list