Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/scipy/io/matlab/mio4.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.io.matlab` namespace for importing the functions
3# included below.
5import warnings
6from . import _mio4
9__all__ = [ # noqa: F822
10 'MatFile4Reader', 'MatFile4Writer', 'SYS_LITTLE_ENDIAN',
11 'VarHeader4', 'VarReader4', 'VarWriter4', 'arr_to_2d', 'mclass_info',
12 'mdtypes_template', 'miDOUBLE', 'miINT16', 'miINT32', 'miSINGLE',
13 'miUINT16', 'miUINT8', 'mxCHAR_CLASS', 'mxFULL_CLASS', 'mxSPARSE_CLASS',
14 'np_to_mtypes', 'order_codes', 'MatFileReader', 'docfiller',
15 'matdims', 'read_dtype', 'convert_dtypes', 'arr_to_chars',
16 'arr_dtype_number', 'squeeze_element', 'chars_to_strings'
17]
19def __dir__():
20 return __all__
23def __getattr__(name):
24 if name not in __all__:
25 raise AttributeError(
26 "scipy.io.matlab.mio4 is deprecated and has no attribute "
27 f"{name}. Try looking in scipy.io.matlab instead.")
29 warnings.warn(f"Please use `{name}` from the `scipy.io.matlab` namespace, "
30 "the `scipy.io.matlab.mio4` namespace is deprecated.",
31 category=DeprecationWarning, stacklevel=2)
33 return getattr(_mio4, name)