interpolation.py 933 B

12345678910111213141516171819202122232425262728293031
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.ndimage` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _interpolation
  6. __all__ = [ # noqa: F822
  7. 'spline_filter1d', 'spline_filter',
  8. 'geometric_transform', 'map_coordinates',
  9. 'affine_transform', 'shift', 'zoom', 'rotate',
  10. 'normalize_axis_index', 'docfiller'
  11. ]
  12. def __dir__():
  13. return __all__
  14. def __getattr__(name):
  15. if name not in __all__:
  16. raise AttributeError(
  17. "scipy.ndimage.interpolation is deprecated and has no attribute "
  18. f"{name}. Try looking in scipy.ndimage instead.")
  19. warnings.warn(f"Please use `{name}` from the `scipy.ndimage` namespace, "
  20. "the `scipy.ndimage.interpolation` namespace is deprecated.",
  21. category=DeprecationWarning, stacklevel=2)
  22. return getattr(_interpolation, name)