[NumPy-Tickets] [NumPy] #1477: NumPy inverts a singular matrix

NumPy Trac numpy-tickets@scipy....
Wed May 5 14:13:49 CDT 2010

#1477: NumPy inverts a singular matrix
 Reporter:  egonschiele                                         |       Owner:  pv   
     Type:  defect                                              |      Status:  new  
 Priority:  normal                                              |   Milestone:  2.0.0
Component:  numpy.linalg                                        |     Version:  devel
 Keywords:  linear-algebra matrix singular determinant inverse  |  
 This might be just a question of precision. In the following code, A2 is a
 singular matrix. NumPy calculates it's inverse and prints out a non-zero
 determinant even though the matrix A2 is clearly singular:

 A = array([[.1,.01,.3],[.2,.99,.3],[.7,0,.4]])
 I = identity(3)

 A2 = A - I    # this should be singular
 print inv(A2) # prints out a singular matrix(!!)
 print det(A2) # prints -2.33146835171e-18 instead of 0

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

More information about the NumPy-Tickets mailing list