Skip to content

Commit a3ab2d0

Browse files
committed
Fixes rechunk not honoring the requested chunking structure
1 parent efac263 commit a3ab2d0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/mdio/api/convenience.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,23 @@ def create_rechunk_plan(
145145
raise NameError(msg)
146146

147147
metadata_arrs.append(
148-
metadata_group.zeros_like(
148+
metadata_group.zeros(
149149
name=f"chunked_{suffix}_trace_headers",
150-
data=metadata_array,
150+
shape=metadata_array.shape,
151151
chunks=norm_chunks[:-1],
152+
dtype=metadata_array.dtype,
152153
compressor=header_compressor,
153154
overwrite=overwrite,
154155
**CREATE_KW,
155156
)
156157
)
157158

158159
data_arrs.append(
159-
data_group.zeros_like(
160+
data_group.zeros(
160161
name=f"chunked_{suffix}",
161-
data=data_array,
162+
shape=data_array.shape,
162163
chunks=norm_chunks,
164+
dtype=data_array.dtype,
163165
compressor=trace_compressor,
164166
overwrite=overwrite,
165167
**CREATE_KW,

0 commit comments

Comments
 (0)