Skip to content

Commit

Permalink
Update query.py: initialize intersection coords with empty again
Browse files Browse the repository at this point in the history
  • Loading branch information
Huite authored Oct 14, 2024
1 parent 96a2168 commit 7738c69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numba_celltree/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7738c69

Please sign in to comment.