rbf.py 818 B

123456789101112131415161718192021222324252627282930313233
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.interpolate` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _rbf
  6. __all__ = [ # noqa: F822
  7. 'Rbf',
  8. 'cdist',
  9. 'linalg',
  10. 'pdist',
  11. 'squareform',
  12. 'xlogy',
  13. ]
  14. def __dir__():
  15. return __all__
  16. def __getattr__(name):
  17. if name not in __all__:
  18. raise AttributeError(
  19. "scipy.interpolate.rbf is deprecated and has no attribute "
  20. f"{name}. Try looking in scipy.interpolate instead.")
  21. warnings.warn(f"Please use `{name}` from the `scipy.interpolate` namespace, "
  22. "the `scipy.interpolate.rbf` namespace is deprecated.",
  23. category=DeprecationWarning, stacklevel=2)
  24. return getattr(_rbf, name)