mio5_params.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. import warnings
  5. from . import _mio5_params
  6. __all__ = [ # noqa: F822
  7. 'MDTYPES', 'MatlabFunction', 'MatlabObject', 'MatlabOpaque',
  8. 'NP_TO_MTYPES', 'NP_TO_MXTYPES', 'OPAQUE_DTYPE', 'codecs_template',
  9. 'mat_struct', 'mclass_dtypes_template', 'mclass_info', 'mdtypes_template',
  10. 'miCOMPRESSED', 'miDOUBLE', 'miINT16', 'miINT32', 'miINT64', 'miINT8',
  11. 'miMATRIX', 'miSINGLE', 'miUINT16', 'miUINT32', 'miUINT64', 'miUINT8',
  12. 'miUTF16', 'miUTF32', 'miUTF8', 'mxCELL_CLASS', 'mxCHAR_CLASS',
  13. 'mxDOUBLE_CLASS', 'mxFUNCTION_CLASS', 'mxINT16_CLASS', 'mxINT32_CLASS',
  14. 'mxINT64_CLASS', 'mxINT8_CLASS', 'mxOBJECT_CLASS',
  15. 'mxOBJECT_CLASS_FROM_MATRIX_H', 'mxOPAQUE_CLASS', 'mxSINGLE_CLASS',
  16. 'mxSPARSE_CLASS', 'mxSTRUCT_CLASS', 'mxUINT16_CLASS', 'mxUINT32_CLASS',
  17. 'mxUINT64_CLASS', 'mxUINT8_CLASS', 'convert_dtypes'
  18. ]
  19. def __dir__():
  20. return __all__
  21. def __getattr__(name):
  22. if name not in __all__:
  23. raise AttributeError(
  24. "scipy.io.matlab.mio5_params is deprecated and has no attribute "
  25. f"{name}. Try looking in scipy.io.matlab instead.")
  26. warnings.warn(f"Please use `{name}` from the `scipy.io.matlab` namespace, "
  27. "the `scipy.io.matlab.mio5_params` namespace is deprecated.",
  28. category=DeprecationWarning, stacklevel=2)
  29. return getattr(_mio5_params, name)