-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Hi,
There is a bug with expm_multiply. If I just use a complex matrix and vector the function returns the correct vector but when I use the linear grid feature it seems to be casting the vector to a float while iterating through the grid points:
site-packages/scipy/sparse/linalg/_expm_multiply.py:568: ComplexWarning: Casting complex values to real discards the imaginary part
X[0] = _expm_multiply_simple_core(A, B, t_0, mu, m_star, s)
site-packages/scipy/sparse/linalg/_expm_multiply.py:654: ComplexWarning: Casting complex values to real discards the imaginary part
K[p] = h * A.dot(K[p-1]) / float(p)
site-packages/scipy/sparse/linalg/_expm_multiply.py:663: ComplexWarning: Casting complex values to real discards the imaginary part
X[k + id] = np.exp(kh*mu) * F
I'm using scipy 0.17.1.