Skip to content

Commit 9cef7b3

Browse files
committed
Fix tuple vs list type for chunks
1 parent 9ab60cd commit 9cef7b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fractal_helper_tasks/convert_2D_segmentation_to_3D.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def convert_2D_segmentation_to_3D(
175175

176176
# 1a) Load a 2D label image
177177
label_img = da.from_zarr(f"{zarr_url}/labels/{label_name}/{level}")
178-
chunks = label_img.chunksize
178+
chunks = list(label_img.chunksize)
179179

180180
# 1b) Get number z planes & Z spacing from 3D OME-Zarr file
181181
with zarr.open(zarr_3D_url, mode="rw+") as zarr_img:
@@ -188,6 +188,7 @@ def convert_2D_segmentation_to_3D(
188188
chunks[-3] = z_chunks
189189
else:
190190
chunks[-3] = z_chunk_3d
191+
chunks = tuple(chunks)
191192

192193
image_meta = load_NgffImageMeta(zarr_3D_url)
193194
z_pixel_size = image_meta.get_pixel_sizes_zyx(level=0)[0]

0 commit comments

Comments
 (0)