[SciPy-user] LU decomposition of a sparse matrix ?

Nils Wagner nwagner at mecha.uni-stuttgart.de
Fri Jan 16 08:49:01 CST 2004


Hi all,

from scipy import *
from scipy.sparse import *
def sylvester(n):
    d = zeros((2, n), Float)
    d[0, :] = arange(n, 0, -1)
    d[1, :] = arange(1, n+1)
    print d
    A = spdiags(d, [-1, 1], n, n)
    return A
n = 6
S = sylvester(n)
print S

Is it possible to convert a sparse matrix into a full matrix in scipy ?

How about LU decomposition in case of sparse matrices ?


Nils



More information about the SciPy-user mailing list