decomp_qr.py 796 B

123456789101112131415161718192021222324252627
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.linalg` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _decomp_qr
  6. __all__ = [ # noqa: F822
  7. 'qr', 'qr_multiply', 'rq', 'get_lapack_funcs', 'safecall'
  8. ]
  9. def __dir__():
  10. return __all__
  11. def __getattr__(name):
  12. if name not in __all__:
  13. raise AttributeError(
  14. "scipy.linalg.decomp_qr is deprecated and has no attribute "
  15. f"{name}. Try looking in scipy.linalg instead.")
  16. warnings.warn(f"Please use `{name}` from the `scipy.linalg` namespace, "
  17. "the `scipy.linalg.decomp_qr` namespace is deprecated.",
  18. category=DeprecationWarning, stacklevel=2)
  19. return getattr(_decomp_qr, name)