Skip to content

Commit 0bf1cf0

Browse files
committed
Use KVStore when checking for in-memory data
Checking against MutableMapping categories all BaseStores as in-memory stores.
1 parent 8da9f17 commit 0bf1cf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zarr/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
is_scalar,
3232
pop_fields,
3333
)
34-
from zarr.storage import array_meta_key, attrs_key, getsize, listdir, BaseStore
34+
from zarr.storage import KVStore, array_meta_key, attrs_key, getsize, listdir, BaseStore
3535
from zarr.util import (
3636
all_equal,
3737
InfoReporter,
@@ -2153,7 +2153,7 @@ def _encode_chunk(self, chunk):
21532153
cdata = chunk
21542154

21552155
# ensure in-memory data is immutable and easy to compare
2156-
if isinstance(self.chunk_store, MutableMapping):
2156+
if isinstance(self.chunk_store, KVStore):
21572157
cdata = ensure_bytes(cdata)
21582158

21592159
return cdata

0 commit comments

Comments
 (0)