Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/sparse/linalg/dsolve.py: 57%
14 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-12 06:31 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-12 06:31 +0000
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.
5import warnings
6from . import _dsolve
9__all__ = [ # noqa: F822
10 'MatrixRankWarning', 'SuperLU', 'factorized',
11 'spilu', 'splu', 'spsolve',
12 'spsolve_triangular', 'use_solver', 'linsolve', 'test'
13]
15dsolve_modules = ['linsolve']
18def __dir__():
19 return __all__
22def __getattr__(name):
23 if name not in __all__ and name not in dsolve_modules:
24 raise AttributeError(
25 "scipy.sparse.linalg.dsolve is deprecated and has no attribute "
26 f"{name}. Try looking in scipy.sparse.linalg instead.")
28 if name in dsolve_modules:
29 msg = (f'The module `scipy.sparse.linalg.dsolve.{name}` is '
30 'deprecated. All public names must be imported directly from '
31 'the `scipy.sparse.linalg` namespace.')
32 else:
33 msg = (f"Please use `{name}` from the `scipy.sparse.linalg` namespace,"
34 " the `scipy.sparse.linalg.eigen` namespace is deprecated.")
36 warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
38 return getattr(_dsolve, name)