Skip to content

Commit

Permalink
fix: cast doesn't work in numpy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Jul 19, 2024
1 parent ed9c117 commit 4b42739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kimimaro/intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def paint_walls(binimg):
changed.add(fruit)
binimg |= (cc_labels[slc] == fruit)

fruit = np.cast[cc_labels.dtype](fruit)
fruit = np.asarray(fruit, dtype=cc_labels.dtype)
binimg, N = fill_voids.fill(binimg, in_place=True, return_fill_count=True)
cc_labels[slc] *= ~binimg
cc_labels[slc] += fruit * binimg
Expand Down

0 comments on commit 4b42739

Please sign in to comment.