miobase.py 988 B

12345678910111213141516171819202122232425262728293031
  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 _miobase
  6. __all__ = [ # noqa: F822
  7. 'MatFileReader', 'MatReadError', 'MatReadWarning',
  8. 'MatVarReader', 'MatWriteError', 'arr_dtype_number',
  9. 'arr_to_chars', 'convert_dtypes', 'doc_dict',
  10. 'docfiller', 'get_matfile_version',
  11. 'matdims', 'read_dtype', 'doccer', 'boc'
  12. ]
  13. def __dir__():
  14. return __all__
  15. def __getattr__(name):
  16. if name not in __all__:
  17. raise AttributeError(
  18. "scipy.io.matlab.miobase is deprecated and has no attribute "
  19. f"{name}. Try looking in scipy.io.matlab instead.")
  20. warnings.warn(f"Please use `{name}` from the `scipy.io.matlab` namespace, "
  21. "the `scipy.io.matlab.miobase` namespace is deprecated.",
  22. category=DeprecationWarning, stacklevel=2)
  23. return getattr(_miobase, name)