mio_utils.py 786 B

1234567891011121314151617181920212223242526
  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 _mio_utils
  6. __all__ = ['squeeze_element', 'chars_to_strings'] # noqa: F822
  7. def __dir__():
  8. return __all__
  9. def __getattr__(name):
  10. if name not in __all__:
  11. raise AttributeError(
  12. "scipy.io.matlab.mio_utils is deprecated and has no attribute "
  13. f"{name}. Try looking in scipy.io.matlab instead.")
  14. warnings.warn(f"Please use `{name}` from the `scipy.io.matlab` namespace, "
  15. "the `scipy.io.matlab.mio_utils` namespace is deprecated.",
  16. category=DeprecationWarning, stacklevel=2)
  17. return getattr(_mio_utils, name)