bsplines.py 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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 _bsplines
  6. __all__ = [ # noqa: F822
  7. 'spline_filter', 'bspline', 'gauss_spline', 'cubic', 'quadratic',
  8. 'cspline1d', 'qspline1d', 'cspline1d_eval', 'qspline1d_eval',
  9. 'logical_and', 'zeros_like', 'piecewise', 'array', 'arctan2',
  10. 'tan', 'arange', 'floor', 'exp', 'greater', 'less', 'add',
  11. 'less_equal', 'greater_equal', 'cspline2d', 'sepfir2d', 'comb',
  12. 'float_factorial'
  13. ]
  14. def __dir__():
  15. return __all__
  16. def __getattr__(name):
  17. if name not in __all__:
  18. raise AttributeError(
  19. "scipy.signal.bsplines is deprecated and has no attribute "
  20. f"{name}. Try looking in scipy.signal instead.")
  21. warnings.warn(f"Please use `{name}` from the `scipy.signal` namespace, "
  22. "the `scipy.signal.bsplines` namespace is deprecated.",
  23. category=DeprecationWarning, stacklevel=2)
  24. return getattr(_bsplines, name)