[SciPy-dev] Tri-diagonal LAPACK Routines - Shall I interface them?

David Warde-Farley dwf@cs.toronto....
Wed Dec 2 14:48:53 CST 2009


On 2-Dec-09, at 3:43 AM, Benny Malengier wrote:

> would be a type of sparse matrix one can manipulate. This would allow
> things like changing matrix diagonal orded form sparse matrix to a csr
> matrix, adding some extra elements off the diagonals, and then calling
> a more generic solver.


Well, often when people talk about sparse matrices they mean (often  
unstructured) matrices that are _very_ sparse, like, large systems  
with a very small fraction of the matrix elements non-zero. Banded  
systems don't really fit in this kind of way of thinking because they  
are a) structured and b) relatively dense. That said, I'm not certain  
there are any strong feelings on the matter from the maintainers of  
scipy.sparse, so if you'd like to see this kind of functionality you  
might as well open a ticket and submit a patch.

Note that converting to CSR and then adding elements would probably be  
an inefficient way to do it.  In general the compressed formats don't  
lend themselves to insertion; dok_matrix might be a better bet, with a  
conversion to CSR when you freeze the contents.

David


More information about the SciPy-Dev mailing list