Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/scipy/sparse/compressed.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 _compressed
9__all__ = [ # noqa: F822
10 'IndexMixin',
11 'SparseEfficiencyWarning',
12 'check_shape',
13 'csr_column_index1',
14 'csr_column_index2',
15 'csr_row_index',
16 'csr_row_slice',
17 'csr_sample_offsets',
18 'csr_sample_values',
19 'csr_todense',
20 'downcast_intp_index',
21 'get_csr_submatrix',
22 'get_sum_dtype',
23 'getdtype',
24 'is_pydata_spmatrix',
25 'isdense',
26 'isintlike',
27 'isscalarlike',
28 'isshape',
29 'operator',
30 'to_native',
31 'upcast',
32 'upcast_char',
33 'warn',
34]
37def __dir__():
38 return __all__
41def __getattr__(name):
42 if name not in __all__:
43 raise AttributeError(
44 "scipy.sparse.compressed is deprecated and has no attribute "
45 f"{name}. Try looking in scipy.sparse instead.")
47 warnings.warn(f"Please use `{name}` from the `scipy.sparse` namespace, "
48 "the `scipy.sparse.compressed` namespace is deprecated.",
49 category=DeprecationWarning, stacklevel=2)
51 return getattr(_compressed, name)