[SciPy-user] Obtaining factors of sparse matrices

josef.pktd@gmai... josef.pktd@gmai...
Thu Apr 2 23:15:55 CDT 2009

On Thu, Apr 2, 2009 at 11:02 PM, Bill Cochran <wkcochran@gmail.com> wrote:
> I am new to scipy.  I would like to compare fill-in between a standard GEPP and
> one that I have developed to schedule pivoting in parallel codes.  My matrices
> are large and sparse.  In MATLAB code, I need this:
> [L,U] = lu ( A )
> nnz(U)
> I have looked at the scipy documentation and I believe the function I am looking
> for is sparse.linalg.splu (...).  I do not know what permc_spec means.  Neither
> I nor Google know what a "factored_lu" object is.  And I don't understand the
> instruction:  "See scipy.sparse.linalg.dsolve._superlu.dgstrf for more info."
> Neither does Google.

I'm just looking up the source, I don't know this part of scipy:

the above means that the only documentation of the details is in the c source

144	permc_spec          specifies the matrix ordering used for the
145	                    0: natural ordering\n\
146	                    1: MMD applied to the structure of A^T * A\n\
147	                    2: MMD applied to the structure of A^T + A\n\
148	                    3: COLAMD, approximate minimum degree column ordering\n\
149	                    (default: 2)\n\


splu is just a thin wrapper around dgrstrf (for double), see

if umfpack (scikits) is installed, than LU is calculated using umfpack

That's browsing the source, for more info you need someone who knows
this part. The return type of functions, I usually just inspect for an
example dir(result), ...


> Any help would be appreciated.  I am kind of crunched for time and thought I'd
> see if scipy lived up to the hype.  Please help scipy live up to the hype.
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-user mailing list