[SciPy-user] 2 more sparse questions

Ed Schofield schofield at ftw.at
Tue Aug 1 05:05:25 EDT 2006


[CC to list]

William Hunter wrote:
> Ed;
>
> I'm still chipping away at this, ... <snip>
> Thought I'd respond off-list as it might be too specific, but I'll add
> it to the scipy wiki once I've figured it out.
>
> System: {U} = [K]{F}
> Q1) For a sparse symmetric banded K, and an extremely sparse F (one to
> five entries in a vector of length > 1200), what is the best solver to
> use?
>   
I don't know. SciPy only has wrappers for SuperLU and UMFPACK, so I
suggest you read the documentation for those (e.g.
http://www.cise.ufl.edu/research/sparse/umfpack/v5.0/UMFPACK/Doc/UserGuide.pdf)
to find out what cases the routines are designed to handle. If you need
something more specialized, try Roman Geus's PySparse. It's not yet been
ported from Numeric to NumPy, although I did port the basic matrix
objects a while ago (in the SciPy sandbox), and that went fine. And
there's Tim Davis's CSparse
(http://www.cise.ufl.edu/research/sparse/CSparse/), which could be
wrapped with ctypes ...

Perhaps Robert Cimrman can give you more specific advice ... he wrote
the UMFPACK wrapper and knows more about sparse solvers than I do.

> Q2) At the moment I'm just using linsolve.spsolve, but I also see that
> there is a linsolve.splu. No docstring, obviously LU factorisation, but
> what does one use then?
>
> I'll create an example 3 demonstrating the use.
>   

Yeah, we need a docstring for this. I've never used it before either.
But it's a wrapper for the SuperLU factorization functions like
dgstrf(), and you could figure it out by reading the source and the
SuperLU docs. If you could contribute a docstring I'd be very happy to
commit it :)

-- Ed




More information about the SciPy-User mailing list