fitpack.py 948 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.interpolate` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _fitpack_py
  6. __all__ = [ # noqa: F822
  7. 'BSpline',
  8. 'bisplev',
  9. 'bisplrep',
  10. 'dblint',
  11. 'insert',
  12. 'spalde',
  13. 'splantider',
  14. 'splder',
  15. 'splev',
  16. 'splint',
  17. 'splprep',
  18. 'splrep',
  19. 'sproot',
  20. ]
  21. def __dir__():
  22. return __all__
  23. def __getattr__(name):
  24. if name not in __all__:
  25. raise AttributeError(
  26. "scipy.interpolate.fitpack is deprecated and has no attribute "
  27. f"{name}. Try looking in scipy.interpolate instead.")
  28. warnings.warn(f"Please use `{name}` from the `scipy.interpolate` namespace, "
  29. "the `scipy.interpolate.fitpack` namespace is deprecated.",
  30. category=DeprecationWarning, stacklevel=2)
  31. return getattr(_fitpack_py, name)