From d23cc008f86d5a46aa9b39da7d8c29db56945e6f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 16:02:29 +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/detection/line_zone.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/supervision/detection/line_zone.py b/supervision/detection/line_zone.py index f85604c4..e01001c0 100644 --- a/supervision/detection/line_zone.py +++ b/supervision/detection/line_zone.py @@ -161,7 +161,7 @@ class LineZone: cross_products_1 = self._cross_product(all_anchors, self.limits[0]) cross_products_2 = self._cross_product(all_anchors, self.limits[1]) # anchor is in limits if it's on the same side of both limit vectors - in_limits = ~ np.logical_xor(cross_products_1 > 0, cross_products_2 > 0) + in_limits = ~np.logical_xor(cross_products_1 > 0, cross_products_2 > 0) # Reduce array to find out if all anchors for a detection are within limits in_limits = np.min(in_limits, axis=0) @@ -208,7 +208,9 @@ class LineZone: Returns: Array of cross products of shape (number of anchors, detections) """ - vector_at_zero = np.array([vector.end.x - vector.start.x, vector.end.y - vector.start.y]) + vector_at_zero = np.array( + [vector.end.x - vector.start.x, vector.end.y - vector.start.y] + ) vector_start = np.array([vector.start.x, vector.start.y]) return np.cross(vector_at_zero, anchors - vector_start)