Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/scipy/io/matlab/mio5_params.py: 70%

10 statements  

« 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.io.matlab` namespace for importing the functions 

3# included below. 

4 

5import warnings 

6from . import _mio5_params 

7 

8 

9__all__ = [ # noqa: F822 

10 'MDTYPES', 'MatlabFunction', 'MatlabObject', 'MatlabOpaque', 

11 'NP_TO_MTYPES', 'NP_TO_MXTYPES', 'OPAQUE_DTYPE', 'codecs_template', 

12 'mat_struct', 'mclass_dtypes_template', 'mclass_info', 'mdtypes_template', 

13 'miCOMPRESSED', 'miDOUBLE', 'miINT16', 'miINT32', 'miINT64', 'miINT8', 

14 'miMATRIX', 'miSINGLE', 'miUINT16', 'miUINT32', 'miUINT64', 'miUINT8', 

15 'miUTF16', 'miUTF32', 'miUTF8', 'mxCELL_CLASS', 'mxCHAR_CLASS', 

16 'mxDOUBLE_CLASS', 'mxFUNCTION_CLASS', 'mxINT16_CLASS', 'mxINT32_CLASS', 

17 'mxINT64_CLASS', 'mxINT8_CLASS', 'mxOBJECT_CLASS', 

18 'mxOBJECT_CLASS_FROM_MATRIX_H', 'mxOPAQUE_CLASS', 'mxSINGLE_CLASS', 

19 'mxSPARSE_CLASS', 'mxSTRUCT_CLASS', 'mxUINT16_CLASS', 'mxUINT32_CLASS', 

20 'mxUINT64_CLASS', 'mxUINT8_CLASS', 'convert_dtypes' 

21] 

22 

23def __dir__(): 

24 return __all__ 

25 

26 

27def __getattr__(name): 

28 if name not in __all__: 

29 raise AttributeError( 

30 "scipy.io.matlab.mio5_params is deprecated and has no attribute " 

31 f"{name}. Try looking in scipy.io.matlab instead.") 

32 

33 warnings.warn(f"Please use `{name}` from the `scipy.io.matlab` namespace, " 

34 "the `scipy.io.matlab.mio5_params` namespace is deprecated.", 

35 category=DeprecationWarning, stacklevel=2) 

36 

37 return getattr(_mio5_params, name)