From eb7f7b0ad4525f97368c5ed1757e923fdaebcadd Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Thu, 7 Apr 2022 21:44:37 -0700 Subject: [PATCH] enable short-circuit eval for comparison --- snarled/poly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snarled/poly.py b/snarled/poly.py index ddc01dc..172a709 100644 --- a/snarled/poly.py +++ b/snarled/poly.py @@ -87,7 +87,7 @@ def intersects(poly_a: ArrayLike, poly_b: ArrayLike) -> bool: max_a = poly_a.max(axis=0) max_b = poly_b.max(axis=0) - if ((min_a > max_b) | (min_b > max_a)).any(): + if (min_a > max_b).any() or (min_b > max_a).any(): return False #TODO: Check against sorted coords?