From b8f187c8b13b40c00b0e7bd93303c2313fe70136 Mon Sep 17 00:00:00 2001 From: Huite Bootsma Date: Mon, 11 Dec 2023 09:25:00 +0100 Subject: [PATCH] type hints --- numba_celltree/geometry_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numba_celltree/geometry_utils.py b/numba_celltree/geometry_utils.py index 782e95b..1337dee 100644 --- a/numba_celltree/geometry_utils.py +++ b/numba_celltree/geometry_utils.py @@ -142,7 +142,7 @@ def point_in_polygon(p: Point, poly: Sequence) -> bool: @nb.njit(inline="always") -def in_bounds(p: Point, a: Point, b: Point): +def in_bounds(p: Point, a: Point, b: Point) -> bool: """ Check whether point p falls within the bounding box created by a and b (after we've checked the size of the cross product). @@ -246,7 +246,7 @@ def bounding_box( def build_bboxes( faces: IntArray, vertices: FloatArray, -) -> Tuple[FloatArray, IntArray]: +) -> FloatArray: # Make room for the bounding box of every polygon. n_polys = len(faces) bbox_coords = np.empty((n_polys, NDIM * 2), FloatDType)