From 4b427398d1e3629416b7e360d76dfa3402ea2028 Mon Sep 17 00:00:00 2001 From: William Silversmith Date: Fri, 19 Jul 2024 18:33:28 -0400 Subject: [PATCH] fix: cast doesn't work in numpy 2.0 --- kimimaro/intake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kimimaro/intake.py b/kimimaro/intake.py index 318ca05..a9a88af 100644 --- a/kimimaro/intake.py +++ b/kimimaro/intake.py @@ -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