Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Nov 27, 2022
1 parent 318d856 commit 6d8f209
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flox/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ def _extract_unknown_groups(reduced, dtype) -> tuple[DaskArray]:
dask.array.Array(
HighLevelGraph.from_collections(groups_token, layer, dependencies=[reduced]),
groups_token,
chunks=(np.nan,),
chunks=((np.nan,),),
meta=np.array([], dtype=dtype),
),
)
Expand Down Expand Up @@ -1327,12 +1327,12 @@ def dask_groupby_agg(
)
if is_duck_dask_array(by_input) and expected_groups is None:
groups = _extract_unknown_groups(reduced, dtype=by.dtype)
group_chunks = (np.nan,)
group_chunks = ((np.nan,),)
else:
if expected_groups is None:
expected_groups = _get_expected_groups(by_input, sort=sort)
groups = (expected_groups.to_numpy(),)
group_chunks = ((len(expected_groups),),)
group_chunks = ((len(expected_groups),),)

elif method == "cohorts":
chunks_cohorts = find_group_cohorts(
Expand Down

0 comments on commit 6d8f209

Please sign in to comment.