We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is it safe to use the ODE solvers with a complex tensor?
For example
def f(t, x): print(t) return 3 * x x0 = torch.from_numpy(np.array([1 + 1j, 2 + 2j, 3 + 3j])) print(x0.dtype) t_span = torch.linspace(0, 1, 3) t, x = odeint(f, x0, t_span, 'rk4')
returns
torch.complex128 tensor(0.) tensor(0.+0.j, dtype=torch.complex128) tensor(0.2500+0.j, dtype=torch.complex128) tensor(0.2500+0.j, dtype=torch.complex128) tensor(0.5000) tensor(0.5000+0.j, dtype=torch.complex128) tensor(0.7500+0.j, dtype=torch.complex128) tensor(0.7500+0.j, dtype=torch.complex128)
I'm not sure why the time gets converted to a complex value and thus wonder about the complex support of the various solvers.
The text was updated successfully, but these errors were encountered:
t_span
No branches or pull requests
Is it safe to use the ODE solvers with a complex tensor?
For example
returns
I'm not sure why the time gets converted to a complex value and thus wonder about the complex support of the various solvers.
The text was updated successfully, but these errors were encountered: