Skip to content

Commit

Permalink
refactor: use np.iinfo.max instead of relying on overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Jul 19, 2024
1 parent ca0c35b commit fa65ba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kimimaro/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def join_close_components(skeletons, radius=None):
N = len(skels)

radii_matrix = np.full( (N, N), np.inf, dtype=np.float32 )
index_matrix = np.full( (N, N, 2), -1, dtype=np.uint32 )
index_matrix = np.full( (N, N, 2), np.iinfo(np.uint32).max, dtype=np.uint32 )

for i in range(N):
for j in range(i + 1, N): # compute upper triangle only
Expand Down

0 comments on commit fa65ba6

Please sign in to comment.