Skip to content

Commit b77305c

Browse files
committed
Avoid realizing a potentially very large RangeIndex in to memory
xref #428
1 parent 9e82b66 commit b77305c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: flox/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ def dask_groupby_agg(
17301730
group_chunks = ((np.nan,),)
17311731
else:
17321732
assert expected_groups is not None
1733-
groups = (expected_groups.to_numpy(),)
1733+
groups = (expected_groups,)
17341734
group_chunks = ((len(expected_groups),),)
17351735

17361736
elif method == "cohorts":
@@ -1964,7 +1964,7 @@ def _groupby_aggregate(a, **kwargs):
19641964
num_groups=num_groups,
19651965
)
19661966

1967-
groups = (expected_groups.to_numpy(),)
1967+
groups = (expected_groups,)
19681968

19691969
return (result, groups)
19701970

0 commit comments

Comments
 (0)