realtransforms.py 826 B

123456789101112131415161718192021222324252627
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.fftpack` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _realtransforms
  6. __all__ = [ # noqa: F822
  7. 'dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn', 'idstn'
  8. ]
  9. def __dir__():
  10. return __all__
  11. def __getattr__(name):
  12. if name not in __all__:
  13. raise AttributeError(
  14. "scipy.fftpack.realtransforms is deprecated and has no attribute "
  15. f"{name}. Try looking in scipy.fftpack instead.")
  16. warnings.warn(f"Please use `{name}` from the `scipy.fftpack` namespace, "
  17. "the `scipy.fftpack.realtransforms` namespace is deprecated.",
  18. category=DeprecationWarning, stacklevel=2)
  19. return getattr(_realtransforms, name)