basic.py 1.0 KB

12345678910111213141516171819202122232425262728293031
  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 _basic
  6. __all__ = [ # noqa: F822
  7. 'solve', 'solve_triangular', 'solveh_banded', 'solve_banded',
  8. 'solve_toeplitz', 'solve_circulant', 'inv', 'det', 'lstsq',
  9. 'pinv', 'pinvh', 'matrix_balance', 'matmul_toeplitz',
  10. 'atleast_1d', 'atleast_2d', 'get_flinalg_funcs', 'get_lapack_funcs',
  11. 'LinAlgError', 'LinAlgWarning', 'levinson'
  12. ]
  13. def __dir__():
  14. return __all__
  15. def __getattr__(name):
  16. if name not in __all__:
  17. raise AttributeError(
  18. "scipy.linalg.basic is deprecated and has no attribute "
  19. f"{name}. Try looking in scipy.linalg instead.")
  20. warnings.warn(f"Please use `{name}` from the `scipy.linalg` namespace, "
  21. "the `scipy.linalg.basic` namespace is deprecated.",
  22. category=DeprecationWarning, stacklevel=2)
  23. return getattr(_basic, name)