[SciPy-user] Is this a bug: scipy.cov([0,1]) = 0

Emin.shopper Martinian.shopper emin.shopper at gmail.com
Wed Nov 7 10:10:04 EST 2007


Dear Experts,

I recently noticed some strange behavior with scipy (and numpy as
well). Doing scipy.cov([0,1]) returns 0 which I believe is incorrect.
Doing scipy.cov([0.0,1.0]) returns a more reasonable answer so I
suspect that the problem is that scipy is using integer math.

Is this considered a bug?

I can see no good reason to do integer math when computing a covariance.

Thanks,
-Emin



More information about the SciPy-User mailing list