[SciPy-user] New sparse matrix functionality

Robert Cimrman cimrman3 at ntc.zcu.cz
Wed Mar 1 10:32:36 CST 2006

>>Do you also plan to add the c-based linked-list matrix as in PySparse
>>(ll_mat.c there)? This could be even faster than using the Python  
> Well, I guess it would be nice to have, and the code's already  
> written, but I don't know how we'd make it derive from the spmatrix  
> base class, which is written in Python.  Travis mentioned back in  
> October that this is possible but not easy.  So it would require some  

well, we might eventually write a llmat class in Python that will 
'borrow' (and appreciate, of course ;-)) relevant ll_mat functions - we 
do not need the ll_mat Python object. I can live without it for now, 
though :-)

> work.  I don't need the extra speed personally -- the new class seems  
> to be fast enough for my needs (the bottleneck for my work is now  
> elsewhere :)

OK, I see... Can you tell me where? Just curious :-)

> An update: I've changed the matrix.__mul__ function in NumPy SVN to  
> return NotImplemented if the right operand defines __rmul__ and isn't  
> a NumPy-compatible type.  This seems to work fine for * now.   
> Functions like numpy.dot() still won't work on sparse matrices, but I  
> don't really have a problem with this ;)

Fine with me...

In the meantime, I have added a rudimentary umfpack support to the 
sparse module - it is used when present by 'solve' (and can be switched 
off). I have also fixed the umfpack module in the sandbox for complex 
matrices. (At least I hope so :))

Still, the umfpack must be installed separately, doing the classical
'python setup.py install' in its sandbox home, because I am still 
struggling with a proper system_info class to detect the umfpack 
libraries in the system. Any help/ideas would be appreciated.


More information about the SciPy-user mailing list