Skip to content

Commit

Permalink
fix: ensure addition is performed as uint64
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Jan 29, 2025
1 parent bc5f019 commit 6b9d787
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions igneous/tasks/image/ccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def CCLFacesTask(
connectivity=6, in_place=True
)
cc_labels = cc3d.connected_components(labels, connectivity=6, out_dtype=np.uint64)
cc_labels += label_offset
cc_labels += np.uint64(label_offset)
cc_labels[labels == 0] = 0

# Uploads leading faces for adjacent tasks to examine
Expand Down Expand Up @@ -236,7 +236,7 @@ def CCLEquivalancesTask(
labels, connectivity=6,
out_dtype=np.uint64, return_N=True
)
cc_labels += label_offset
cc_labels += np.uint64(label_offset)
cc_labels[labels == 0] = 0

for i in range(1, N+1):
Expand Down Expand Up @@ -340,7 +340,7 @@ def RelabelCCLTask(
labels, connectivity=6,
out_dtype=np.uint64, return_N=True
)
cc_labels += label_offset
cc_labels += np.uint64(label_offset)
cc_labels[labels == 0] = 0

task_voxels = shape.x * shape.y * shape.z
Expand Down

0 comments on commit 6b9d787

Please sign in to comment.