File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -737,15 +737,12 @@ def _npg_aggregate(
737
737
)
738
738
739
739
740
- def _conc2 (x_chunk , key1 , key2 = None , axis = None ) -> np .ndarray :
740
+ def _conc2 (x_chunk , key1 , key2 = slice ( None ) , axis = None ) -> np .ndarray :
741
741
"""copied from dask.array.reductions.mean_combine"""
742
742
from dask .array .core import _concatenate2
743
743
from dask .utils import deepmap
744
744
745
- if key2 is not None :
746
- mapped = deepmap (lambda x : x [key1 ][key2 ], x_chunk )
747
- else :
748
- mapped = deepmap (lambda x : x [key1 ], x_chunk )
745
+ mapped = deepmap (lambda x : x [key1 ][key2 ], x_chunk )
749
746
return _concatenate2 (mapped , axes = axis )
750
747
751
748
# This doesn't seem to improve things at all; and some tests fail...
@@ -925,7 +922,7 @@ def groupby_agg(
925
922
assert all (ax >= 0 for ax in axis )
926
923
927
924
# these are negative axis indices useful for concatenating the intermediates
928
- neg_axis = range (- len (axis ), 0 )
925
+ neg_axis = tuple ( range (- len (axis ), 0 ) )
929
926
930
927
inds = tuple (range (array .ndim ))
931
928
name = f"groupby_{ agg .name } "
You can’t perform that action at this time.
0 commit comments