File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -1344,17 +1344,8 @@ def dask_groupby_agg(
1344
1344
# find number of groups in each chunk, this is needed for output chunks
1345
1345
# along the reduced axis
1346
1346
slices = slices_from_chunks (tuple (array .chunks [ax ] for ax in axis ))
1347
- if expected_groups is None :
1348
- groups_in_block = tuple (_unique (by_input [slc ]) for slc in slices )
1349
- else :
1350
- # For cohorts, we could be indexing a block with groups that
1351
- # are not in the cohort (usually for nD `by`)
1352
- # Only keep the expected groups.
1353
- groups_in_block = tuple (
1354
- np .intersect1d (by_input [slc ], expected_groups ) for slc in slices
1355
- )
1347
+ groups_in_block = tuple (_unique (by_input [slc ]) for slc in slices )
1356
1348
groups = (np .concatenate (groups_in_block ),)
1357
-
1358
1349
ngroups_per_block = tuple (len (grp ) for grp in groups_in_block )
1359
1350
group_chunks = (ngroups_per_block ,)
1360
1351
You can’t perform that action at this time.
0 commit comments