Closed numpy-gitbot closed 12 years ago
Milestone changed to 1.5.1
by trac user zoof on 2010-10-30
atmention:pv wrote on 2010-10-30
Not a bug.
If you want right solve, do
p=linalg.solve(Q.T,a)
trac user zoof wrote on 2010-10-31
The help file indicates that it solves systems of the form A x = b. From what I understand is happening is that because my "b" is a row vector, it is solving x A = b. Either linalg.solve should throw an error when it gets a row vector or else the documentation should be amended.
atmention:pv wrote on 2010-10-31
No, linalg.solve
is always solving "A x = b", i.e., it does the left inverse.
In your code, you assume it solves "x A = b", which it does not.
Original ticket http://projects.scipy.org/numpy/ticket/1655 on 2010-10-30 by trac user zoof, assigned to atmention:pv.
There appears to be a bug in either the linear system solver or in the way than linalg computes LU decompositions. On a number of different distributions, using somewhat different versions of numpy, I get much better precision by inverting the matrix (linalg.inv) and multiplying than by either linalg.solve alone or linalg.cholesky in combination with linalg.solve. An example has been posted to: http://pastebin.com/KpXdTVh7
numpy 1.3.0 on Ubuntu Lucid numpy 1.5.0 on Arch numpy 1.5.1rc1 on Centos