matfuncs.py 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.linalg` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _matfuncs
  6. __all__ = [ # noqa: F822
  7. 'expm', 'cosm', 'sinm', 'tanm', 'coshm', 'sinhm',
  8. 'tanhm', 'logm', 'funm', 'signm', 'sqrtm',
  9. 'expm_frechet', 'expm_cond', 'fractional_matrix_power',
  10. 'khatri_rao', 'prod', 'logical_not', 'ravel', 'transpose',
  11. 'conjugate', 'absolute', 'amax', 'sign', 'isfinite', 'single',
  12. 'norm', 'solve', 'inv', 'triu', 'svd', 'schur', 'rsf2csf', 'eps', 'feps'
  13. ]
  14. def __dir__():
  15. return __all__
  16. def __getattr__(name):
  17. if name not in __all__:
  18. raise AttributeError(
  19. "scipy.linalg.matfuncs is deprecated and has no attribute "
  20. f"{name}. Try looking in scipy.linalg instead.")
  21. warnings.warn(f"Please use `{name}` from the `scipy.linalg` namespace, "
  22. "the `scipy.linalg.matfuncs` namespace is deprecated.",
  23. category=DeprecationWarning, stacklevel=2)
  24. return getattr(_matfuncs, name)