[SciPy-User] sparse matrix construction question

Eric Carlson ecarlson@eng.ua....
Fri Apr 13 14:47:47 CDT 2012

I have a million row sparse matrix that can be created almost 
instantaneously using spdiags and csr format. I need to add one column 
and one row, and insert some nonzeros at various (symmetric) locations 
in the row and columns. I can easily accomplish this using lil format, 
but this increases the construction to around 20 seconds from about .05 

I can probably work something out in fortran + f2py pretty easily, but ...

Any python sparse matrix wizards out there with some tips?

Eric Carlson

More information about the SciPy-User mailing list