Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/scipy/sparse/coo.py: 70%
10 statements
« prev ^ index » next coverage.py v7.3.1, created at 2023-09-23 06:43 +0000
« prev ^ index » next coverage.py v7.3.1, created at 2023-09-23 06:43 +0000
1# This file is not meant for public use and will be removed in SciPy v2.0.0.
2# Use the `scipy.sparse` namespace for importing the functions
3# included below.
5import warnings
6from . import _coo
9__all__ = [ # noqa: F822
10 'SparseEfficiencyWarning',
11 'check_reshape_kwargs',
12 'check_shape',
13 'coo_matrix',
14 'coo_matvec',
15 'coo_tocsr',
16 'coo_todense',
17 'downcast_intp_index',
18 'getdata',
19 'getdtype',
20 'isshape',
21 'isspmatrix_coo',
22 'operator',
23 'spmatrix',
24 'to_native',
25 'upcast',
26 'upcast_char',
27 'warn',
28]
31def __dir__():
32 return __all__
35def __getattr__(name):
36 if name not in __all__:
37 raise AttributeError(
38 "scipy.sparse.coo is deprecated and has no attribute "
39 f"{name}. Try looking in scipy.sparse instead.")
41 warnings.warn(f"Please use `{name}` from the `scipy.sparse` namespace, "
42 "the `scipy.sparse.coo` namespace is deprecated.",
43 category=DeprecationWarning, stacklevel=2)
45 return getattr(_coo, name)