pseudo_diffs.py 901 B

123456789101112131415161718192021222324252627282930
  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 _pseudo_diffs
  6. __all__ = [ # noqa: F822
  7. 'diff',
  8. 'tilbert', 'itilbert', 'hilbert', 'ihilbert',
  9. 'cs_diff', 'cc_diff', 'sc_diff', 'ss_diff',
  10. 'shift', 'iscomplexobj', 'convolve'
  11. ]
  12. def __dir__():
  13. return __all__
  14. def __getattr__(name):
  15. if name not in __all__:
  16. raise AttributeError(
  17. "scipy.fftpack.pseudo_diffs is deprecated and has no attribute "
  18. f"{name}. Try looking in scipy.fftpack instead.")
  19. warnings.warn(f"Please use `{name}` from the `scipy.fftpack` namespace, "
  20. "the `scipy.fftpack.pseudo_diffs` namespace is deprecated.",
  21. category=DeprecationWarning, stacklevel=2)
  22. return getattr(_pseudo_diffs, name)