[SciPy-user] Sparse factorisation

Robert Cimrman cimrman3@ntc.zcu...
Fri May 1 09:27:57 CDT 2009


Gael Varoquaux wrote:
> On Thu, Apr 30, 2009 at 03:56:19PM +0200, Gael Varoquaux wrote:
>> I have been looking around in the sparse code source, as well as the
>> scikits.umfpack code source, and I must admit I am a bit at loss to what
>> is the best way to achieve my goals. 
> 
> I have dug a bit further. It seems that all that needs to be done is
> expose the L, U, perm_c and perm_r attributes of the SciPyLUObject (AKA
> factored_lu object) returned by splu. Of course this easier said than
> done, as exposing these objects requires creating scipy sparse matrices
> from the inner SuperLU representation of these objects.
> 
> I'd really appreciate if someone (most probably Nathan) could give me a
> hand with this. I realise that I am asking people to do my work, and I
> know exactly what my reaction is when someone comes around to me with
> this request (ie, not happy), but I am not sure I have to time required
> to learn the library and the tools to do this myself, and would hate to
> have to find an ugly workaround (this does sound like a bad excuse).

Hi again, Gael,

I have completely forgotten that Nathan added lu() method to the 
UmfpackContext class, that returns all the L, U, P, Q, R matrices.

from scipy.sparse.linalg.dsolve import umfpack
uc = umfpack.UmfpackContext()
uc.lu(a)

Is it what you need?
r.



More information about the SciPy-user mailing list