Skip to content

Commit 7bd2a7e

Browse files
Tarik Onalanalimanfoo
authored andcommitted
Fix dtype expansion during store initialization
Otherwise, array data would not match shape with unstructured dtype.
1 parent ee475e6 commit 7bd2a7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zarr/storage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,9 @@ def _init_array_metadata(store, shape, chunks=None, dtype=None, compressor='defa
329329
err_contains_group(path)
330330

331331
# normalize metadata
332-
shape = normalize_shape(shape)
333332
dtype, object_codec = normalize_dtype(dtype, object_codec)
333+
shape = normalize_shape(shape) + dtype.shape
334+
dtype = dtype.base
334335
chunks = normalize_chunks(chunks, shape, dtype.itemsize)
335336
order = normalize_order(order)
336337
fill_value = normalize_fill_value(fill_value, dtype)

0 commit comments

Comments
 (0)