From 7738c690ea525699e8afd3bc58e0830a0d366265 Mon Sep 17 00:00:00 2001 From: Huite Date: Mon, 14 Oct 2024 13:21:49 +0200 Subject: [PATCH] Update query.py: initialize intersection coords with empty again --- numba_celltree/query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numba_celltree/query.py b/numba_celltree/query.py index e3e9f62..cd8a716 100644 --- a/numba_celltree/query.py +++ b/numba_celltree/query.py @@ -350,7 +350,7 @@ def locate_edges_helper( # Ensure the initial indices array isn't too small. n = max(n_edge, 256) indices = np.empty((n, 2), dtype=IntDType) - xy = np.zeros((n, 2, 2), dtype=FloatDType) + xy = np.empty((n, 2, 2), dtype=FloatDType) total_count = 0 indices_size = 0 @@ -391,7 +391,7 @@ def locate_edges(box_coords: FloatArray, tree: CellTreeData, n_chunks: int): ) total_size = sum(counts) - xy = np.zeros((total_size, 2, 2), dtype=FloatDType) + xy = np.empty((total_size, 2, 2), dtype=FloatDType) start = 0 for i, size in enumerate(counts): end = start + size