Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/zarr/testing/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,13 @@ def arrays(
arrays = numpy_arrays(shapes=shapes)
nparray = draw(arrays, label="array data")
chunk_shape = draw(chunk_shapes(shape=nparray.shape), label="chunk shape")
extra_kwargs = {}
dim_names: None | list[str | None] = None
if zarr_format == 3 and all(c > 0 for c in chunk_shape):
shard_shape = draw(
st.none() | shard_shapes(shape=nparray.shape, chunk_shape=chunk_shape),
label="shard shape",
)
extra_kwargs["dimension_names"] = draw(
dimension_names(ndim=nparray.ndim), label="dimension names"
)
dim_names = draw(dimension_names(ndim=nparray.ndim), label="dimension names")
else:
shard_shape = None
# test that None works too.
Expand All @@ -285,7 +283,7 @@ def arrays(
attributes=attributes,
# compressor=compressor, # FIXME
fill_value=fill_value,
**extra_kwargs,
dimension_names=dim_names,
)

assert isinstance(a, Array)
Expand Down
Loading