isolve.py 904 B

123456789101112131415161718192021222324252627282930
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.sparse.linalg` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _isolve
  6. __all__ = [ # noqa: F822
  7. 'bicg', 'bicgstab', 'cg', 'cgs', 'gcrotmk', 'gmres',
  8. 'lgmres', 'lsmr', 'lsqr',
  9. 'minres', 'qmr', 'tfqmr', 'utils', 'iterative', 'test'
  10. ]
  11. def __dir__():
  12. return __all__
  13. def __getattr__(name):
  14. if name not in __all__:
  15. raise AttributeError(
  16. "scipy.sparse.linalg.isolve is deprecated and has no attribute "
  17. f"{name}. Try looking in scipy.sparse.linalg instead.")
  18. warnings.warn(f"Please use `{name}` from the `scipy.sparse.linalg` namespace, "
  19. "the `scipy.sparse.linalg.isolve` namespace is deprecated.",
  20. category=DeprecationWarning, stacklevel=2)
  21. return getattr(_isolve, name)