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

2011-11-10 Thread Stéfan van der Walt
On Thu, Nov 10, 2011 at 10:45 AM, Peter Prettenhofer wrote: >> 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 o

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

2011-11-10 Thread Peter Prettenhofer
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_

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

2011-11-09 Thread Stéfan van der Walt
Hi Peter On Wed, Nov 9, 2011 at 3:38 AM, Peter Prettenhofer wrote: > I recently got the latest numpy version (2.0.0.dev-7297785) from the > git repo and realized that `np.dot` causes a segfault if its operands > are scipy sparse matrices. Here's some code to reproduce the problem:: > >   import n

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

2011-11-09 Thread Peter Prettenhofer
Hi everybody, I recently got the latest numpy version (2.0.0.dev-7297785) from the git repo and realized that `np.dot` causes a segfault if its operands are scipy sparse matrices. Here's some code to reproduce the problem:: import numpy as np from scipy import sparse as sp A = np.random.