[NumPy-Tickets] [NumPy] #2186: failure to solve system of linear equations

NumPy Trac numpy-tickets@scipy....
Mon Jul 16 01:16:34 CDT 2012


#2186: failure to solve system of linear equations
----------------------------------+-----------------------------------------
 Reporter:  al_khwarizmi          |       Owner:  pv         
     Type:  defect                |      Status:  new        
 Priority:  normal                |   Milestone:  Unscheduled
Component:  numpy.linalg          |     Version:  1.6.1      
 Keywords:  gaussian elimination  |  
----------------------------------+-----------------------------------------
 Sadly, numpy.linalg.solve is giving me crap:

 {{{
 a = numpy.matrix('[1 2 -2 0; 1 0 0 -2; 3 2 -1 -6; 0 1 0 -1]')
 b = numpy.matrix('0; 0; 0; 0')
 numpy.linalg.solve(a, b)
 }}}

 outputs a zero vector.

 If it means anything, I'm not just trying to break numpy; this is a real
 system of stoichiometric equations. The computer algebra system Maxima
 outputs the correct answer. In Maxima what I did was type in:

 {{{
 linsolve([r0 + 2*r1 = 2*p0, r0 = 2*p1, 3*r0 + 2*r1 = p0 + 6*p1, r1 = p1],
 [r0, r1, p0, p1]);
 }}}

 It outputs:

 {{{
 [r0 = 2 %r2, r1 = %r2, p0 = 2 %r2, p1 = %r2]
 }}}

 Thanks in advance for your hard work.

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


More information about the NumPy-Tickets mailing list