[SciPy-dev] scipy.sparse.linalg segfaults for complex data

Jake VanderPlas jakevdp at gmail.com
Wed Dec 9 19:05:51 EST 2009


Hello,
I just opened a ticket for this problem (#1067), but I'd like to get
this out to the list.  I've found that the iterative solvers in
scipy.sparse.linalg produce Segmentation Faults for complex inputs.
Below is a simple example (for scipy v0.7.1).  Should these functions
support complex data?  If not, does anyone know a good way to solve
general linear systems for complex input?  I say general because I
don't actually have a matrix per se, but a LinearOperator which
implements its matvec method using scipy.fftpack.
Thanks
   Jake


import numpy as np
from scipy.sparse.linalg import cg

N = 2
M = np.random.random((N,N)) + 1j*np.random.random((N,N))
v = np.random.random(N)
cg(M,v)  #segmentation fault is here



More information about the SciPy-Dev mailing list