diff --git a/supervision/geometry/utils.py b/supervision/geometry/utils.py index 2247adc5..81e1e5d3 100644 --- a/supervision/geometry/utils.py +++ b/supervision/geometry/utils.py @@ -20,14 +20,14 @@ def get_polygon_center(polygon: np.ndarray) -> Point: ValueError: If the polygon has no vertices. Examples: - ```python - import numpy as np - import supervision as sv - - polygon = np.array([[0, 0], [0, 2], [2, 2], [2, 0]]) - sv.get_polygon_center(polygon=polygon) - # Point(x=1, y=1) - ``` + >>> import numpy as np + >>> import supervision as sv + >>> polygon = np.array([[0, 0], [0, 2], [2, 2], [2, 0]]) + >>> center = sv.get_polygon_center(polygon=polygon) + >>> float(center.x) + 1.0 + >>> float(center.y) + 1.0 """ # This is one of the 3 candidate algorithms considered for centroid calculation.