Saturday 15 June 2013

Numpy linear solver in Python -



Numpy linear solver in Python -

i using numpy.linalg.solve solve set of linear equations, coefficient matrix is

a = [[ 1.00000000e+00 0.00000000e+00 0.00000000e+00 ..., 0.00000000e+00 0.00000000e+00 0.00000000e+00] [ 0.00000000e+00 1.00000000e+00 0.00000000e+00 ..., 0.00000000e+00 0.00000000e+00 0.00000000e+00] [ 0.00000000e+00 0.00000000e+00 1.00000000e+00 ..., 0.00000000e+00 0.00000000e+00 0.00000000e+00] ..., [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ..., 1.19206809e+12 -1.22559480e+12 3.46092750e+11] [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ..., -1.80896480e+14 2.54068164e+12 -8.65658340e+12] [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ..., 6.92185500e+11 4.23578160e+12 -6.79632634e+12]]

and b matrix is

[0.0, 0.0, 0.0, 0.0 ..........................150000]

and think should output matrix [0.0, 0.0]

however, actual results non-zeros value, can help me figure out reason?

thank in advance.

python numpy

No comments:

Post a Comment