fitpack2.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 _fitpack2
  6. __all__ = [ # noqa: F822
  7. 'BivariateSpline',
  8. 'InterpolatedUnivariateSpline',
  9. 'LSQBivariateSpline',
  10. 'LSQSphereBivariateSpline',
  11. 'LSQUnivariateSpline',
  12. 'RectBivariateSpline',
  13. 'RectSphereBivariateSpline',
  14. 'SmoothBivariateSpline',
  15. 'SmoothSphereBivariateSpline',
  16. 'SphereBivariateSpline',
  17. 'UnivariateSpline',
  18. 'array',
  19. 'concatenate',
  20. 'dfitpack',
  21. 'dfitpack_int',
  22. 'diff',
  23. 'ones',
  24. 'ravel',
  25. 'zeros',
  26. ]
  27. def __dir__():
  28. return __all__
  29. def __getattr__(name):
  30. if name not in __all__:
  31. raise AttributeError(
  32. "scipy.interpolate.fitpack2 is deprecated and has no attribute "
  33. f"{name}. Try looking in scipy.interpolate instead.")
  34. warnings.warn(f"Please use `{name}` from the `scipy.interpolate` namespace, "
  35. "the `scipy.interpolate.fitpack2` namespace is deprecated.",
  36. category=DeprecationWarning, stacklevel=2)
  37. return getattr(_fitpack2, name)