scijit.integrate.ODEpackError

exception scijit.integrate.ODEpackError

Bases: Exception

Exception class odeint() uses for ODEPACK binding checks.

Raised for an args that is not a tuple and for a tolerance of the wrong length or rank. Derives straight from Exception.

Notes

scipy raises its private scipy.integrate._odepack.error for the same checks, likewise derived from Exception.

Examples

>>> import numpy as np
>>> from numba import njit
>>> import scijit.integrate as si
>>> @njit
... def rhs(y, t):
...     return -y
>>> try:                                  # args must be a tuple
...     si.odeint(rhs, np.array([1.0]), np.array([0.0, 1.0]), [3.0])
... except si.ODEpackError as e:
...     print(e)
Extra arguments must be in a tuple.