Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/sparse/compressed.py: 70%

10 statements  

« 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. 

4 

5import warnings 

6from . import _compressed 

7 

8 

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_index_dtype', 

23 'get_sum_dtype', 

24 'getdtype', 

25 'is_pydata_spmatrix', 

26 'isdense', 

27 'isintlike', 

28 'isscalarlike', 

29 'isshape', 

30 'isspmatrix', 

31 'operator', 

32 'spmatrix', 

33 'to_native', 

34 'upcast', 

35 'upcast_char', 

36 'warn', 

37] 

38 

39 

40def __dir__(): 

41 return __all__ 

42 

43 

44def __getattr__(name): 

45 if name not in __all__: 

46 raise AttributeError( 

47 "scipy.sparse.compressed is deprecated and has no attribute " 

48 f"{name}. Try looking in scipy.sparse instead.") 

49 

50 warnings.warn(f"Please use `{name}` from the `scipy.sparse` namespace, " 

51 "the `scipy.sparse.compressed` namespace is deprecated.", 

52 category=DeprecationWarning, stacklevel=2) 

53 

54 return getattr(_compressed, name)