rotation.py 872 B

123456789101112131415161718192021222324252627282930313233
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.spatial` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _rotation
  6. __all__ = [ # noqa: F822
  7. 'Rotation',
  8. 'Slerp',
  9. 'check_random_state',
  10. 'create_group',
  11. 're',
  12. ]
  13. def __dir__():
  14. return __all__
  15. def __getattr__(name):
  16. if name not in __all__:
  17. raise AttributeError(
  18. "scipy.spatial.transform.rotation is deprecated and has no attribute "
  19. f"{name}. Try looking in scipy.spatial instead.")
  20. warnings.warn(f"Please use `{name}` from the `scipy.spatial.transform` "
  21. "namespace, the `scipy.spatial.transform.rotation` namespace"
  22. " is deprecated.",
  23. category=DeprecationWarning, stacklevel=2)
  24. return getattr(_rotation, name)