[NumPy-Tickets] [NumPy] #2137: cov fails with complex data

NumPy Trac numpy-tickets@scipy....
Sun May 20 04:15:14 CDT 2012


#2137: cov fails with complex data
--------------------+-------------------------------------------------------
 Reporter:  mph     |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  1.6.1      
 Keywords:          |  
--------------------+-------------------------------------------------------
 The cov function fails with complex data due to line 1990 in
 function_base.py

 X = array(m, ndmin=2, dtype=float)

 For example, with
 a = np.array(((1, 2, 3),(1j, 2j, 3j)))

 np.cov(a) gives

 array([[ 1.,  0.],
        [ 0.,  0.]])

 whereas the correct answer is

 array([[ 1.,  -1.j],
        [ 1.j,  1.]])

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2137>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list