spline.py 810 B

1234567891011121314151617181920212223242526
  1. # This file is not meant for public use and will be removed in the future
  2. # versions of SciPy. Use the `scipy.signal` namespace for importing the
  3. # functions included below.
  4. import warnings
  5. from . import _spline
  6. __all__ = [ # noqa: F822
  7. 'cspline2d', 'qspline2d', 'sepfir2d', 'symiirorder1', 'symiirorder2']
  8. def __dir__():
  9. return __all__
  10. def __getattr__(name):
  11. if name not in __all__:
  12. raise AttributeError(
  13. f"scipy.signal.spline is deprecated and has no attribute {name}. "
  14. "Try looking in scipy.signal instead.")
  15. warnings.warn(f"Please use `{name}` from the `scipy.signal` namespace, "
  16. "the `scipy.signal.spline` namespace is deprecated.",
  17. category=DeprecationWarning, stacklevel=2)
  18. return getattr(_spline, name)