models.py 785 B

123456789101112131415161718192021222324252627
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.odr` namespace for importing the functions
  3. # included below.
  4. __all__ = [ # noqa: F822
  5. 'Model', 'exponential', 'multilinear', 'unilinear',
  6. 'quadratic', 'polynomial'
  7. ]
  8. def __dir__():
  9. return __all__
  10. def __getattr__(name):
  11. msg = ("`scipy.odr` is deprecated as of version 1.17.0 and will be removed in "
  12. "SciPy 1.19.0. Please use `https://pypi.org/project/odrpack/` instead.")
  13. if name not in __all__:
  14. raise AttributeError(
  15. f"`scipy.odr.models` has no attribute {name}. In addition, {msg}")
  16. import warnings
  17. from . import _models
  18. warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
  19. return getattr(_models, name)