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

Anthony Kong Anthony.Kong@macquarie....
Tue Jul 29 23:10:50 CDT 2008


Hi, all,
 
I am trying out the example here
(http://www.scipy.org/Numpy_Example_List_With_Doc#cov)
 
 
>>> from numpy import *
...
>>> T = array([1.3, 4.5, 2.8, 3.9])   
>>> P = array([2.7, 8.7, 4.7, 8.2])  
>>> cov(T,P)                                
 
The answer is supposed to be 3.9541666666666657

The result I got is instead a cov matrix
array([[ 1.97583333,  3.95416667],
       [ 3.95416667,  8.22916667]])
So, I just wanna confirm this particular example may be no longer
correct.

I am using python 2.4.3 with numpy 1.1.0 on MS win
 
Cheers, Anthony
 
 
 
 
 
 
 

NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Group Limited or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Group Limited does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Group Limited.



More information about the Numpy-discussion mailing list