_trirefine.pyi 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. from typing import Literal, overload
  2. import numpy as np
  3. from numpy.typing import ArrayLike
  4. from matplotlib.tri._triangulation import Triangulation
  5. from matplotlib.tri._triinterpolate import TriInterpolator
  6. class TriRefiner:
  7. def __init__(self, triangulation: Triangulation) -> None: ...
  8. class UniformTriRefiner(TriRefiner):
  9. def __init__(self, triangulation: Triangulation) -> None: ...
  10. @overload
  11. def refine_triangulation(
  12. self, *, return_tri_index: Literal[True], subdiv: int = ...
  13. ) -> tuple[Triangulation, np.ndarray]: ...
  14. @overload
  15. def refine_triangulation(
  16. self, return_tri_index: Literal[False] = ..., subdiv: int = ...
  17. ) -> Triangulation: ...
  18. @overload
  19. def refine_triangulation(
  20. self, return_tri_index: bool = ..., subdiv: int = ...
  21. ) -> tuple[Triangulation, np.ndarray] | Triangulation: ...
  22. def refine_field(
  23. self,
  24. z: ArrayLike,
  25. triinterpolator: TriInterpolator | None = ...,
  26. subdiv: int = ...,
  27. ) -> tuple[Triangulation, np.ndarray]: ...