odepack.py 771 B

12345678910111213141516171819202122232425
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.integrate` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _odepack_py
  6. __all__ = ['odeint', 'ODEintWarning'] # noqa: F822
  7. def __dir__():
  8. return __all__
  9. def __getattr__(name):
  10. if name not in __all__:
  11. raise AttributeError(
  12. "scipy.integrate.odepack is deprecated and has no attribute "
  13. f"{name}. Try looking in scipy.integrate instead.")
  14. warnings.warn(f"Please use `{name}` from the `scipy.integrate` namespace, "
  15. "the `scipy.integrate.odepack` namespace is deprecated.",
  16. category=DeprecationWarning, stacklevel=2)
  17. return getattr(_odepack_py, name)