Skip to content

expm_multiply, complex matrices not working using start,stop,ect... #6377

@weinbe58

Description

@weinbe58

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.sparse.linalg

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions