From 5cb608734d45f971ec3c59a6ba92f4275844bb18 Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 8 Mar 2026 10:17:52 -0700 Subject: [PATCH] [poly_contains_points] consistently return boolean arrays --- masque/utils/vertices.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/masque/utils/vertices.py b/masque/utils/vertices.py index 7d3791c..c4a7cb6 100644 --- a/masque/utils/vertices.py +++ b/masque/utils/vertices.py @@ -62,7 +62,7 @@ def poly_contains_points( vertices: ArrayLike, points: ArrayLike, include_boundary: bool = True, - ) -> NDArray[numpy.int_]: + ) -> NDArray[numpy.bool_]: """ Tests whether the provided points are inside the implicitly closed polygon described by the provided list of vertices. @@ -81,7 +81,7 @@ def poly_contains_points( vertices = numpy.asarray(vertices, dtype=float) if points.size == 0: - return numpy.zeros(0, dtype=numpy.int8) + return numpy.zeros(0, dtype=bool) min_bounds = numpy.min(vertices, axis=0)[None, :] max_bounds = numpy.max(vertices, axis=0)[None, :]