signaltools.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.signal` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _signaltools
  6. __all__ = [ # noqa: F822
  7. 'correlate', 'correlation_lags', 'correlate2d',
  8. 'convolve', 'convolve2d', 'fftconvolve', 'oaconvolve',
  9. 'order_filter', 'medfilt', 'medfilt2d', 'wiener', 'lfilter',
  10. 'lfiltic', 'sosfilt', 'deconvolve', 'hilbert', 'hilbert2',
  11. 'cmplx_sort', 'unique_roots', 'invres', 'invresz', 'residue',
  12. 'residuez', 'resample', 'resample_poly', 'detrend',
  13. 'lfilter_zi', 'sosfilt_zi', 'sosfiltfilt', 'choose_conv_method',
  14. 'filtfilt', 'decimate', 'vectorstrength',
  15. 'timeit', 'cKDTree', 'dlti', 'upfirdn', 'linalg',
  16. 'sp_fft', 'lambertw', 'get_window', 'axis_slice', 'axis_reverse',
  17. 'odd_ext', 'even_ext', 'const_ext', 'cheby1', 'firwin'
  18. ]
  19. def __dir__():
  20. return __all__
  21. def __getattr__(name):
  22. if name not in __all__:
  23. raise AttributeError(
  24. "scipy.signal.signaltools is deprecated and has no attribute "
  25. f"{name}. Try looking in scipy.signal instead.")
  26. warnings.warn(f"Please use `{name}` from the `scipy.signal` namespace, "
  27. "the `scipy.signal.signaltools` namespace is deprecated.",
  28. category=DeprecationWarning, stacklevel=2)
  29. return getattr(_signaltools, name)