[Numpy-discussion] "numpy.linalg.linalg.LinAlgError: Singular matrix" using "numpy.linalg.solve"

SoTaNeZ sotanez at gmail.com
Tue Nov 16 08:13:25 EST 2010


Hi all.

I got this exception while executin numpy.linalg.solve(a,b) being:

a = array([[  1.00000000e+000,  -4.19430400e+006,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000],
               [  1.00000000e+000,   0.00000000e+000,  -2.47845883e-119,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000],
               [  1.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                 -2.68435456e+008,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000],
               [  1.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,  -3.38813179e-021,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000],
               [  1.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,  -4.09600000e+003,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000],
               [  1.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                 -2.56000000e+002,   0.00000000e+000,   0.00000000e+000],
               [  1.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,  -7.20575940e+016,   0.00000000e+000],
               [  1.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,   0.00000000e+000,
                  0.00000000e+000,   0.00000000e+000,  -1.56250000e-002],
               [  1.00000000e+000,   1.00000000e+000,   1.00000000e+000,
                  1.00000000e+000,   1.00000000e+000,   1.00000000e+000,
                  1.00000000e+000,   1.00000000e+000,   1.00000000e+000]])

b = array([0, 0, 0, 0, 0, 0, 0, 0, 1])

I guess some numbers in a are too big or too small, aren't they?

Thanks,
David.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20101116/fba7e408/attachment.html>


More information about the NumPy-Discussion mailing list