[Numpy-discussion] np.dot and scipy sparse matrices

Peter Prettenhofer peter.prettenhofer at gmail.com
Thu Nov 10 13:45:41 EST 2011

Hi Stefan,

thanks a lot for the pull request!

> I don't know if np.dot is supposed to know anything about sparse
> matrices; if so, then a fancier change may be needed.

Ok, then I'll pass that on to the (sparse) scipy folks.
Are there any alternative to np.dot you are aware of? Is
ndarray.__mul__ supposed to work with sparse matrices? AFAIK scipy
does not provide a scipy.sparse.dot function and spmatrix.dot only
allows for "multiplication from the rhs" (ok.. one could directly call
__rmul__ but that's ugly).


Peter Prettenhofer

More information about the NumPy-Discussion mailing list