[NumPy-Tickets] [NumPy] #2031: numpy.cov behaviour change when called with 2 arrays (cross-covariance)
NumPy Trac
numpy-tickets@scipy....
Thu Jan 26 08:50:31 CST 2012
#2031: numpy.cov behaviour change when called with 2 arrays (cross-covariance)
-------------------------+--------------------------------------------------
Reporter: pierreh | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.lib | Version: 1.6.1
Keywords: |
-------------------------+--------------------------------------------------
Comment(by bsouthey):
I disagree with this ticket because it contains many obvious errors.
[[BR]]
1) It is very obvious from basic linear algebra that ''cov(X,X) would
become equivalent to cov(X) '' is incorrect! [[BR]]
2) "cov should only compute the *cross*-covariance of the two arrays" -
this is in fact '''exactly''' what the cov function is doing so there is
no problem.[[BR]]
3) cov(X,Y) is just an equivalent of cov(concatenate(X,Y)) is incorrect as
easily shown:
{{{
>>> X
array([-2.1, -1. , 4.3])
>>> Y
array([ 3. , 1.1 , 0.12])
>>> np.cov(np.concatenate([X,Y]))
array(5.845666666666666)
>>> np.cov(x,y)
array([[ 11.71 , -4.286 ],
[ -4.286 , 2.14413333]])
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2031#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list