moduleTNC.py 746 B

12345678910111213141516171819202122232425262728
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.optimize` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _moduleTNC
  6. __all__ = [ # noqa: F822
  7. ]
  8. def __dir__():
  9. return __all__
  10. def __getattr__(name):
  11. if name not in __all__:
  12. raise AttributeError(
  13. "scipy.optimize.moduleTNC is deprecated and has no attribute "
  14. f"{name}. Try looking in scipy.optimize instead.")
  15. warnings.warn(f"Please use `{name}` from the `scipy.optimize` namespace, "
  16. "the `scipy.optimize.moduleTNC` namespace is deprecated.",
  17. category=DeprecationWarning, stacklevel=2)
  18. return getattr(_moduleTNC, name)