Hi Peter On Wed, Nov 9, 2011 at 3:38 AM, Peter Prettenhofer <peter.prettenho...@gmail.com> 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 numpy as np > from scipy import sparse as sp > A = np.random.rand(10, 10) > S = sp.csr_matrix(A) > _ = np.dot(A, A) # this works OK > _ = np.dot(S, S) # this segfaults!
Here's a patch to get rid of the segfault: https://github.com/numpy/numpy/pull/170 I don't know if np.dot is supposed to know anything about sparse matrices; if so, then a fancier change may be needed. Regards Stéfan _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion