[Numpy-discussion] Adapting algorithm to accept Scipy sparse matrix
Tue Mar 20 11:06:44 CDT 2007
I implemented an algorithm in NumPy which assumes that the input is of type
ndarray, so elementwise multiplication is done as dot(x,y), equation solving
using linalg.solve etc. I now want to modify the whole thing to accept
scipy.sparse matrices (which for instance has linsolve.spsolve instead of
linalg.solve) and I am wondering what's the best way to go about it. I don't
want to check sparse.issparse all the time or even create a separate
sub-class for each data type ... what to do, Ahh! Help!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion