qhull.py 889 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.spatial` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _qhull
  6. __all__ = [ # noqa: F822
  7. 'ConvexHull',
  8. 'Delaunay',
  9. 'HalfspaceIntersection',
  10. 'QhullError',
  11. 'Voronoi',
  12. 'os',
  13. 'sys',
  14. 'tempfile',
  15. 'threading',
  16. 'tsearch',
  17. ]
  18. def __dir__():
  19. return __all__
  20. def __getattr__(name):
  21. if name not in __all__:
  22. raise AttributeError(
  23. "scipy.spatial.qhull is deprecated and has no attribute "
  24. f"{name}. Try looking in scipy.spatial instead.")
  25. warnings.warn(f"Please use `{name}` from the `scipy.spatial` namespace, "
  26. "the `scipy.spatial.qhull` namespace is deprecated.",
  27. category=DeprecationWarning, stacklevel=2)
  28. return getattr(_qhull, name)