Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/sparse/construct.py: 70%
10 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` namespace for importing the functions
3# included below.
5import warnings
6from . import _construct
9__all__ = [ # noqa: F822
10 'block_diag',
11 'bmat',
12 'bsr_matrix',
13 'check_random_state',
14 'coo_matrix',
15 'csc_matrix',
16 'csr_hstack',
17 'csr_matrix',
18 'dia_matrix',
19 'diags',
20 'eye',
21 'get_index_dtype',
22 'hstack',
23 'identity',
24 'isscalarlike',
25 'issparse',
26 'kron',
27 'kronsum',
28 'numbers',
29 'partial',
30 'rand',
31 'random',
32 'rng_integers',
33 'spdiags',
34 'upcast',
35 'vstack',
36]
39def __dir__():
40 return __all__
43def __getattr__(name):
44 if name not in __all__:
45 raise AttributeError(
46 "scipy.sparse.construct is deprecated and has no attribute "
47 f"{name}. Try looking in scipy.sparse instead.")
49 warnings.warn(f"Please use `{name}` from the `scipy.sparse` namespace, "
50 "the `scipy.sparse.construct` namespace is deprecated.",
51 category=DeprecationWarning, stacklevel=2)
53 return getattr(_construct, name)