@@ -912,10 +912,15 @@ def fast_eval( # noqa: C901
912912
913913 # Get the shape of the base array
914914 shape = basearr .shape
915- chunks = basearr .chunks
915+ chunks = kwargs .pop ("chunks" , None )
916+ if chunks is None :
917+ chunks = basearr .chunks
918+ blocks = kwargs .pop ("blocks" , None )
919+ if blocks is None :
920+ blocks = basearr .blocks
916921 # Check whether the partitions are aligned and behaved
917- aligned = blosc2 .are_partitions_aligned (shape , chunks , basearr . blocks )
918- behaved = blosc2 .are_partitions_behaved (shape , chunks , basearr . blocks )
922+ aligned = blosc2 .are_partitions_aligned (shape , chunks , blocks )
923+ behaved = blosc2 .are_partitions_behaved (shape , chunks , blocks )
919924
920925 # Check that all operands are NDArray for fast path
921926 all_ndarray = all (isinstance (value , blosc2 .NDArray ) and value .shape != () for value in operands .values ())
@@ -972,7 +977,7 @@ def fast_eval( # noqa: C901
972977 if getitem :
973978 out = np .empty (shape , dtype = dtype )
974979 else :
975- out = blosc2 .empty (shape , chunks = chunks , blocks = basearr . blocks , dtype = dtype , ** kwargs )
980+ out = blosc2 .empty (shape , chunks = chunks , blocks = blocks , dtype = dtype , ** kwargs )
976981
977982 # Store the result in the output array
978983 if getitem :
0 commit comments