quadpack.py 845 B

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