[SciPy-User] fancy indexing lil_matrix extremely slow
Tue Dec 25 10:16:49 CST 2012
I am using scipy version 0.9. I have a sparse matrix, of which I do not know beforehand what values it will get.
What I did was first generating a scipy.sparse.lil_matrix of zeros (N x N matrix).
To assign values to the sparse matrix I use fancy slicing e.g
for i in range( N ):
myLilMatrix[ 0: N-4, i ] = myArrayWithValuesToAssign
I works fine, however, it is very very slow. I could not use other sparse matrix types, since those does not support fancy indexing for assignment. I was wondering if there is a way to speed up sparse matrix assignements ?
If scipy.sparse module does not support this, does anyone know another module which will be faster ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User