@@ -253,7 +253,6 @@ def _load_metadata_nosync(self):
253253 except KeyError :
254254 raise ArrayNotFoundError (self ._path )
255255 else :
256-
257256 # decode and store metadata as instance members
258257 meta = self ._store ._metadata_class .decode_array_metadata (meta_bytes )
259258 self ._meta = meta
@@ -1358,7 +1357,6 @@ def get_mask_selection(self, selection, out=None, fields=None):
13581357 return self ._get_selection (indexer = indexer , out = out , fields = fields )
13591358
13601359 def _get_selection (self , indexer , out = None , fields = None ):
1361-
13621360 # We iterate over all chunks which overlap the selection and thus contain data
13631361 # that needs to be extracted. Each chunk is processed in turn, extracting the
13641362 # necessary data and storing into the correct location in the output array.
@@ -1983,7 +1981,6 @@ def _set_basic_selection_nd(self, selection, value, fields=None):
19831981 self ._set_selection (indexer , value , fields = fields )
19841982
19851983 def _set_selection (self , indexer , value , fields = None ):
1986-
19871984 # We iterate over all chunks which overlap the selection and thus contain data
19881985 # that needs to be replaced. Each chunk is processed in turn, extracting the
19891986 # necessary data from the value array and storing into the chunk array.
@@ -2018,7 +2015,6 @@ def _set_selection(self, indexer, value, fields=None):
20182015 ):
20192016 # iterative approach
20202017 for chunk_coords , chunk_selection , out_selection in indexer :
2021-
20222018 # extract data to store
20232019 if sel_shape == ():
20242020 chunk_value = value
@@ -2077,7 +2073,6 @@ def _process_chunk(
20772073 and not self ._filters
20782074 and self ._dtype != object
20792075 ):
2080-
20812076 dest = out [out_selection ]
20822077 # Assume that array-like objects that doesn't have a
20832078 # `writeable` flag is writable.
@@ -2088,7 +2083,6 @@ def _process_chunk(
20882083 )
20892084
20902085 if write_direct :
2091-
20922086 # optimization: we want the whole chunk, and the destination is
20932087 # contiguous, so we can decompress directly from the chunk
20942088 # into the destination array
@@ -2321,28 +2315,24 @@ def _process_for_setitem(self, ckey, chunk_selection, value, fields=None):
23212315 # to access the existing chunk data
23222316
23232317 if is_scalar (value , self ._dtype ):
2324-
23252318 # setup array filled with value
23262319 chunk = np .empty_like (
23272320 self ._meta_array , shape = self ._chunks , dtype = self ._dtype , order = self ._order
23282321 )
23292322 chunk .fill (value )
23302323
23312324 else :
2332-
23332325 # ensure array is contiguous
23342326 chunk = value .astype (self ._dtype , order = self ._order , copy = False )
23352327
23362328 else :
23372329 # partially replace the contents of this chunk
23382330
23392331 try :
2340-
23412332 # obtain compressed data for chunk
23422333 cdata = self .chunk_store [ckey ]
23432334
23442335 except KeyError :
2345-
23462336 # chunk not initialized
23472337 if self ._fill_value is not None :
23482338 chunk = np .empty_like (
@@ -2359,7 +2349,6 @@ def _process_for_setitem(self, ckey, chunk_selection, value, fields=None):
23592349 )
23602350
23612351 else :
2362-
23632352 # decode chunk
23642353 chunk = self ._decode_chunk (cdata )
23652354 if not chunk .flags .writeable :
@@ -2429,7 +2418,6 @@ def _decode_chunk(self, cdata, start=None, nitems=None, expected_shape=None):
24292418 return chunk
24302419
24312420 def _encode_chunk (self , chunk ):
2432-
24332421 # apply filters
24342422 if self ._filters :
24352423 for f in self ._filters :
@@ -2619,7 +2607,6 @@ def __setstate__(self, state):
26192607 self .__init__ (** state )
26202608
26212609 def _synchronized_op (self , f , * args , ** kwargs ):
2622-
26232610 if self ._synchronizer is None :
26242611 # no synchronization
26252612 lock = nolock
@@ -2636,7 +2623,6 @@ def _synchronized_op(self, f, *args, **kwargs):
26362623 return result
26372624
26382625 def _write_op (self , f , * args , ** kwargs ):
2639-
26402626 # guard condition
26412627 if self ._read_only :
26422628 raise ReadOnlyError ()
@@ -2676,7 +2662,6 @@ def resize(self, *args):
26762662 return self ._write_op (self ._resize_nosync , * args )
26772663
26782664 def _resize_nosync (self , * args ):
2679-
26802665 # normalize new shape argument
26812666 old_shape = self ._shape
26822667 new_shape = normalize_resize_args (old_shape , * args )
@@ -2755,7 +2740,6 @@ def append(self, data, axis=0):
27552740 return self ._write_op (self ._append_nosync , data , axis = axis )
27562741
27572742 def _append_nosync (self , data , axis = 0 ):
2758-
27592743 # ensure data is array-like
27602744 if not hasattr (data , "shape" ):
27612745 data = np .asanyarray (data , like = self ._meta_array )
0 commit comments