@@ -1702,8 +1702,8 @@ def _chunk_getitems(self, lchunk_coords, lchunk_selection, out, lout_selection,
1702
1702
1703
1703
def _chunk_setitems (self , lchunk_coords , lchunk_selection , values , fields = None ):
1704
1704
ckeys = [self ._chunk_key (co ) for co in lchunk_coords ]
1705
- cdatas = [self ._process_for_setitem (sel , val , fields = fields )
1706
- for sel , val in zip (lchunk_selection , values )]
1705
+ cdatas = [self ._process_for_setitem (key , sel , val , fields = fields )
1706
+ for key , sel , val in zip (ckeys , lchunk_selection , values )]
1707
1707
self .chunk_store .setitems ({k : v for k , v in zip (ckeys , cdatas )})
1708
1708
1709
1709
def _chunk_setitem (self , chunk_coords , chunk_selection , value , fields = None ):
@@ -1734,11 +1734,11 @@ def _chunk_setitem(self, chunk_coords, chunk_selection, value, fields=None):
1734
1734
1735
1735
def _chunk_setitem_nosync (self , chunk_coords , chunk_selection , value , fields = None ):
1736
1736
ckey = self ._chunk_key (chunk_coords )
1737
- cdata = self ._process_for_setitem (chunk_selection , value , fields = fields )
1737
+ cdata = self ._process_for_setitem (ckey , chunk_selection , value , fields = fields )
1738
1738
# store
1739
1739
self .chunk_store [ckey ] = cdata
1740
1740
1741
- def _process_for_setitem (self , chunk_selection , value , fields = None ):
1741
+ def _process_for_setitem (self , ckey , chunk_selection , value , fields = None ):
1742
1742
if is_total_slice (chunk_selection , self ._chunks ) and not fields :
1743
1743
# totally replace chunk
1744
1744
0 commit comments