@@ -253,7 +253,6 @@ def _load_metadata_nosync(self):
253
253
except KeyError :
254
254
raise ArrayNotFoundError (self ._path )
255
255
else :
256
-
257
256
# decode and store metadata as instance members
258
257
meta = self ._store ._metadata_class .decode_array_metadata (meta_bytes )
259
258
self ._meta = meta
@@ -341,7 +340,14 @@ def _flush_metadata_nosync(self):
341
340
filters = filters_config ,
342
341
)
343
342
if getattr (self ._store , "_store_version" , 2 ) == 2 :
344
- meta .update (dict (chunks = self ._chunks , dtype = self ._dtype , order = self ._order ))
343
+ meta .update (
344
+ dict (
345
+ chunks = self ._chunks ,
346
+ dtype = self ._dtype ,
347
+ order = self ._order ,
348
+ dimension_separator = self ._dimension_separator ,
349
+ )
350
+ )
345
351
else :
346
352
meta .update (
347
353
dict (
@@ -1358,7 +1364,6 @@ def get_mask_selection(self, selection, out=None, fields=None):
1358
1364
return self ._get_selection (indexer = indexer , out = out , fields = fields )
1359
1365
1360
1366
def _get_selection (self , indexer , out = None , fields = None ):
1361
-
1362
1367
# We iterate over all chunks which overlap the selection and thus contain data
1363
1368
# that needs to be extracted. Each chunk is processed in turn, extracting the
1364
1369
# necessary data and storing into the correct location in the output array.
@@ -1983,7 +1988,6 @@ def _set_basic_selection_nd(self, selection, value, fields=None):
1983
1988
self ._set_selection (indexer , value , fields = fields )
1984
1989
1985
1990
def _set_selection (self , indexer , value , fields = None ):
1986
-
1987
1991
# We iterate over all chunks which overlap the selection and thus contain data
1988
1992
# that needs to be replaced. Each chunk is processed in turn, extracting the
1989
1993
# necessary data from the value array and storing into the chunk array.
@@ -2018,7 +2022,6 @@ def _set_selection(self, indexer, value, fields=None):
2018
2022
):
2019
2023
# iterative approach
2020
2024
for chunk_coords , chunk_selection , out_selection in indexer :
2021
-
2022
2025
# extract data to store
2023
2026
if sel_shape == ():
2024
2027
chunk_value = value
@@ -2077,7 +2080,6 @@ def _process_chunk(
2077
2080
and not self ._filters
2078
2081
and self ._dtype != object
2079
2082
):
2080
-
2081
2083
dest = out [out_selection ]
2082
2084
# Assume that array-like objects that doesn't have a
2083
2085
# `writeable` flag is writable.
@@ -2088,7 +2090,6 @@ def _process_chunk(
2088
2090
)
2089
2091
2090
2092
if write_direct :
2091
-
2092
2093
# optimization: we want the whole chunk, and the destination is
2093
2094
# contiguous, so we can decompress directly from the chunk
2094
2095
# into the destination array
@@ -2321,28 +2322,24 @@ def _process_for_setitem(self, ckey, chunk_selection, value, fields=None):
2321
2322
# to access the existing chunk data
2322
2323
2323
2324
if is_scalar (value , self ._dtype ):
2324
-
2325
2325
# setup array filled with value
2326
2326
chunk = np .empty_like (
2327
2327
self ._meta_array , shape = self ._chunks , dtype = self ._dtype , order = self ._order
2328
2328
)
2329
2329
chunk .fill (value )
2330
2330
2331
2331
else :
2332
-
2333
2332
# ensure array is contiguous
2334
2333
chunk = value .astype (self ._dtype , order = self ._order , copy = False )
2335
2334
2336
2335
else :
2337
2336
# partially replace the contents of this chunk
2338
2337
2339
2338
try :
2340
-
2341
2339
# obtain compressed data for chunk
2342
2340
cdata = self .chunk_store [ckey ]
2343
2341
2344
2342
except KeyError :
2345
-
2346
2343
# chunk not initialized
2347
2344
if self ._fill_value is not None :
2348
2345
chunk = np .empty_like (
@@ -2359,7 +2356,6 @@ def _process_for_setitem(self, ckey, chunk_selection, value, fields=None):
2359
2356
)
2360
2357
2361
2358
else :
2362
-
2363
2359
# decode chunk
2364
2360
chunk = self ._decode_chunk (cdata )
2365
2361
if not chunk .flags .writeable :
@@ -2429,7 +2425,6 @@ def _decode_chunk(self, cdata, start=None, nitems=None, expected_shape=None):
2429
2425
return chunk
2430
2426
2431
2427
def _encode_chunk (self , chunk ):
2432
-
2433
2428
# apply filters
2434
2429
if self ._filters :
2435
2430
for f in self ._filters :
@@ -2619,7 +2614,6 @@ def __setstate__(self, state):
2619
2614
self .__init__ (** state )
2620
2615
2621
2616
def _synchronized_op (self , f , * args , ** kwargs ):
2622
-
2623
2617
if self ._synchronizer is None :
2624
2618
# no synchronization
2625
2619
lock = nolock
@@ -2636,7 +2630,6 @@ def _synchronized_op(self, f, *args, **kwargs):
2636
2630
return result
2637
2631
2638
2632
def _write_op (self , f , * args , ** kwargs ):
2639
-
2640
2633
# guard condition
2641
2634
if self ._read_only :
2642
2635
raise ReadOnlyError ()
@@ -2676,7 +2669,6 @@ def resize(self, *args):
2676
2669
return self ._write_op (self ._resize_nosync , * args )
2677
2670
2678
2671
def _resize_nosync (self , * args ):
2679
-
2680
2672
# normalize new shape argument
2681
2673
old_shape = self ._shape
2682
2674
new_shape = normalize_resize_args (old_shape , * args )
@@ -2755,7 +2747,6 @@ def append(self, data, axis=0):
2755
2747
return self ._write_op (self ._append_nosync , data , axis = axis )
2756
2748
2757
2749
def _append_nosync (self , data , axis = 0 ):
2758
-
2759
2750
# ensure data is array-like
2760
2751
if not hasattr (data , "shape" ):
2761
2752
data = np .asanyarray (data , like = self ._meta_array )
0 commit comments