[SciPy-dev] Introductions, sparse matrix support

Travis Oliphant oliphant at ee.byu.edu
Thu Oct 13 12:53:09 CDT 2005


Ed Schofield wrote:

>Robert Cimrman wrote:
>
>  
>
>>>>I'd be happy to work with Jonathan, Dan, and Robert on sparse matrix 
>>>>support in SciPy, integrating PySparse code with Travis and Robert's 
>>>>UMFPACK wrapper.  Perhaps we could even find support among other 
>>>>PySparse developers.  PySparse currently depends on Numeric, and will 
>>>>need porting to SciPy Core eventually...
>>>>     
>>>>
>>>>        
>>>>
>>PySparse contains umfpack v4.1, right? Then if it is going to go into 
>>scipy tree, having me wrapping v4.4 separately would be useless - we (me 
>>if you like) could just update what already is in PySparse...
>>
>>We should settle first on the sparse matrix implementation to use and 
>>then care about wrapping related solvers (who almost always use the 
>>CSR/CSC format). I am keenly waiting on the benchmark results of 
>>Jonathan and Dan... (hoping that some work remains for me on Monday (a 
>>trip to Berlin tomorrow)).
>> 
>>
>>    
>>
>Yes, you're right, PySparse does contain UMFPACK 4.1.  It seems from the 
>UMFPACK 4.4 change log that its API is backwardly compatible with 4.1, 
>so perhaps updating PySparse won't require much more than merging the 
>new UMFPACK source tree.
>
>I suggest we adopt all three of PySparse's implementations: LL, CSR, and 
>SSS.
>
Don't forget about CSC....   In fact, I think the sparse matrix should 
allow a number of different formats.
Obviously a few will be used internally more than others.  But, we 
shouldn't enforce a certain structure to early.

LL format is *much* better for building sparse matrices.  But,  CSR or 
CSC is much better for "solving" them.  I suspect that most of the speed 
gain over scipy.sparse is the LL extension type which makes it faster to 
build sparse matrices.

I'd happily welcome those extension types, but let's see if we can't 
make them all subclasses of one base-class.   Look at how the scipy 
sparse Python classes are layed out.  Basically, by defining a tocsc and 
fromcsc, all of them can be converted to each other and used as solvers.

I did put some effort into the structure of scipy.sparse.   I did not 
put any effort into optimizations, though.


-Travis




More information about the Scipy-dev mailing list