[SciPy-dev] sparse matrix support status

Robert Cimrman cimrman3 at ntc.zcu.cz
Fri Oct 7 10:46:49 EDT 2005


Travis Oliphant wrote:
> Robert Cimrman wrote:
> 
>> Hi all,
>>
>> I would like to know what is the status of the sparse matrix support 
>> in SciPy. Searching the scipy- mailing lists did not reveal anything 
>> recent. Is there some code to work on? I would like to help - though I 
>> am a newbie to the Scipy world, I do have experience with sparse 
>> matrices.
>>
>> If there is nothing yet, a quick possibility would be to wrap a 
>> library like sparskit2 and give it a pythonic feel. What are your 
>> opinions?
>>
> 
> There is a sparse matrix in SciPy now:  under Lib/sparse.  I've 
> implemented about 3 or 4 sparse matrices over the years, using various 
> libraries as back-ends.  Right now, the sparse matrix code builds on top 
> of  superlu and some home-grown caclulation tools.
> I'd love some help with this.  So, take a look at what's there and see 
> how you can help.
> 
> -Travis

I have tried to send some suggestions directly to Travis to know his 
opinion before posting it to the list, but some internet-born monster 
ate them all, so let me summarize it here:

I am just redesigning a finite element code (some example results 
obtained by colleagus are at 
http://www-rocq.inria.fr/MACS/Coeur/index.html) written in matlab+c for 
python+c, so the proposals below scratch mainly my itches, but they 
might be of a more general interest.

1. add the umfpack sparse solver

2. I have at hand several convenient and fast routines for CSR format in
the context of assembling finite element matrices, namely
- preallocate the exact storage of the global CSR matrix corresponding
to a given finite element mesh (i.e. create a neighbour graph for the
nodes in the mesh).
- insert/add a full or sparse block (the element "stiffness" matrix) 
into a preallocated CSR matrix (the global matrix)
- ...

I will pythonize the code in all cases, but do you think it would be 
useful to have it in scipy?

Well, and I am willing to do some other work too, but let me first 
reduce my level of scipy-newbieness...

Robert Cimrman




More information about the SciPy-Dev mailing list