From 5cf4b826c77153e8a067a0fa98e949e2b205b763 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 30 Jul 2024 23:55:58 -0700 Subject: [PATCH] index to avoid complaint about scalarizing an array --- adze/voxel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adze/voxel.py b/adze/voxel.py index 291c600..2bc8eab 100644 --- a/adze/voxel.py +++ b/adze/voxel.py @@ -81,7 +81,7 @@ def voxelize( # Recursion case: split along longest side axis = num_planes_remaining.argmax() - plane_ind = num_planes_remaining[axis] // 2 + slices[axis, 0] + plane_ind = (num_planes_remaining[axis] // 2 + slices[axis, 0])[0] plane_pos = aplanes[axis][plane_ind] plane = (numpy.roll([-1, 0, 0], axis), plane_pos)