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
11 changes: 10 additions & 1 deletion src/zarr/testing/stateful.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import zarr
from zarr import Array
from zarr.abc.store import Store
from zarr.codecs.bytes import BytesCodec
from zarr.core.buffer import Buffer, BufferPrototype, cpu, default_buffer_prototype
from zarr.core.sync import SyncMixin
from zarr.storage import LocalStore, MemoryStore
Expand Down Expand Up @@ -108,7 +109,15 @@ def add_array(
assume(self.can_add(path))
note(f"Adding array: path='{path}' shape={array.shape} chunks={chunks}")
for store in [self.store, self.model]:
zarr.array(array, chunks=chunks, path=path, store=store, fill_value=fill_value)
zarr.array(
array,
chunks=chunks,
path=path,
store=store,
fill_value=fill_value,
# Chose bytes codec to avoid wasting time compressing the data being written
codecs=[BytesCodec()],
)
self.all_arrays.add(path)

# @precondition(lambda self: bool(self.all_groups))
Expand Down