Skip to content

Commit 758c9d2

Browse files
authored
Merge pull request #57 from zoccoler/fix_dim_order_in_draw_shapes
Small bug fix, tests pass locally and remotely, so I am merging this.
2 parents 5e31241 + ffa22d6 commit 758c9d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

napari_crop/_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ def draw_fixed_shapes(
278278
# Insert extra coordinates for higher dimensions
279279
# For example, if the shape is 3D, we need to add the z-coordinates
280280
extra_coords = np.take(coord, indices=dims_order[:-2], axis=0)
281-
for i, ec in enumerate(extra_coords):
282-
shape_data = np.insert(shape_data, 0, round(ec), axis=-1)
281+
for ec in extra_coords:
282+
shape_data = np.insert(shape_data, -2, round(ec), axis=-1)
283283
shape_data = shape_data[:, np.argsort(dims_order)]
284284
shapes_data.append(shape_data)
285285

0 commit comments

Comments
 (0)