[SciPy-User] sparse matrix construction question

Eric Carlson ecarlson at eng.ua.edu
Fri Apr 13 15:47:47 EDT 2012


Hello,
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 
seconds.

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

Any python sparse matrix wizards out there with some tips?

Cheers,
Eric Carlson




More information about the SciPy-User mailing list