[Numpy-discussion] Adapting algorithm to accept Scipy sparse matrix
David Koch
ogdude@googlemail....
Tue Mar 20 11:06:44 CDT 2007
Hi,
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!
/David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070320/b393a864/attachment.html
More information about the Numpy-discussion
mailing list