From 960e2529b152b4fd8a96830d3e3a8628da771de8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:44:24 +0000 Subject: [PATCH] =?UTF-8?q?fix(pre=5Fcommit):=20=F0=9F=8E=A8=20auto=20form?= =?UTF-8?q?at=20pre-commit=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervision/geometry/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supervision/geometry/utils.py b/supervision/geometry/utils.py index 401f672e..48a19b2d 100644 --- a/supervision/geometry/utils.py +++ b/supervision/geometry/utils.py @@ -36,7 +36,7 @@ def get_polygon_center(polygon: np.ndarray) -> Point: shifted_polygon = np.roll(polygon, 1, axis=0) points = (shifted_polygon + polygon) / 2 vectors = shifted_polygon - polygon - mass = np.sum(vectors ** 2, axis=1) ** 0.5 + mass = np.sum(vectors**2, axis=1) ** 0.5 center = ((mass @ points) / np.sum(mass)).round() - + return Point(x=center[0], y=center[1])