decomp_schur.py 882 B

12345678910111213141516171819202122232425262728
  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_schur
  6. __all__ = [ # noqa: F822
  7. 'schur', 'rsf2csf', 'asarray_chkfinite', 'single', 'array', 'norm',
  8. 'LinAlgError', 'get_lapack_funcs', 'eigvals', 'eps', 'feps'
  9. ]
  10. def __dir__():
  11. return __all__
  12. def __getattr__(name):
  13. if name not in __all__:
  14. raise AttributeError(
  15. "scipy.linalg.decomp_schur is deprecated and has no attribute "
  16. f"{name}. Try looking in scipy.linalg instead.")
  17. warnings.warn(f"Please use `{name}` from the `scipy.linalg` namespace, "
  18. "the `scipy.linalg.decomp_schur` namespace is deprecated.",
  19. category=DeprecationWarning, stacklevel=2)
  20. return getattr(_decomp_schur, name)