File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 5
5
import operator
6
6
import re
7
7
from functools import reduce
8
+ from collections .abc import MutableMapping
8
9
9
10
import numpy as np
10
11
from numcodecs .compat import ensure_bytes , ensure_ndarray
@@ -1821,7 +1822,7 @@ def _encode_chunk(self, chunk):
1821
1822
cdata = chunk
1822
1823
1823
1824
# ensure in-memory data is immutable and easy to compare
1824
- if isinstance (self .chunk_store , dict ):
1825
+ if isinstance (self .chunk_store , MutableMapping ):
1825
1826
cdata = ensure_bytes (cdata )
1826
1827
1827
1828
return cdata
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ def getsize(store, path: Path = None) -> int:
176
176
if hasattr (store , 'getsize' ):
177
177
# pass through
178
178
return store .getsize (path )
179
- elif isinstance (store , dict ):
179
+ elif isinstance (store , MutableMapping ):
180
180
# compute from size of values
181
181
if path in store :
182
182
v = store [path ]
You can’t perform that action at this time.
0 commit comments