New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] NumPy's asarray wrong casting when evoked from SciPy's integrate.solve_ivp #8453
Comments
Trace's interesting part:
|
Whether the equation is considered complex-valued is probably determined
by the data type of `psi`, instead of the solver trying to guess it
based on return values of the callable.
The documentation states " For problems in a complex domain pass `y0`
with a complex data type (even if the initial guess is purely real)."
|
Wouldn't it be better to use |
The feature to support complex-valued solvers was proposed in the development repository, but never implemented. |
I have recently come across this problem aswell. This time with the dirac equation. This should definitely get a revisit and perhaps the current status quo should be reevaluated. EDIT: 7 December: |
Just thought I'd mention a relevant discussion on the mailing list. |
As RK45 supports complex numbers, it should be able to solve a simple Schrödinger equation, right?
It seems that
solve_ivp
cannot automatically detect than the propagator's type is complex, which will result in a complex vector after the 1st iteration, and then the solver proceeds as if it were still real.Reproducing code example:
Error message:
Scipy/Numpy/Python version information:
The text was updated successfully, but these errors were encountered: