harwell_boeing.py 898 B

1234567891011121314151617181920212223242526272829
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.io` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _harwell_boeing
  6. __all__ = [ # noqa: F822
  7. 'MalformedHeader', 'hb_read', 'hb_write', 'HBInfo',
  8. 'HBFile', 'HBMatrixType', 'FortranFormatParser', 'IntFormat',
  9. 'ExpFormat', 'BadFortranFormat', 'hb'
  10. ]
  11. def __dir__():
  12. return __all__
  13. def __getattr__(name):
  14. if name not in __all__:
  15. raise AttributeError(
  16. "scipy.io.harwell_boeing is deprecated and has no attribute "
  17. f"{name}. Try looking in scipy.io instead.")
  18. warnings.warn(f"Please use `{name}` from the `scipy.io` namespace, "
  19. "the `scipy.io.harwell_boeing` namespace is deprecated.",
  20. category=DeprecationWarning, stacklevel=2)
  21. return getattr(_harwell_boeing, name)