Skip to content

Commit

Permalink
more guards
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jul 25, 2024
1 parent 0805599 commit 6986d3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flox/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2745,6 +2745,8 @@ def groupby_scan(
is_bool_array = np.issubdtype(array.dtype, bool)
array = array.astype(np.intp) if is_bool_array else array

if expected_groups is not None:
raise NotImplementedError("Setting `expected_groups` and binning is not supported yet.")
expected_groups = _validate_expected_groups(nby, expected_groups)
expected_groups = _convert_expected_groups_to_index(
expected_groups, isbin=(False,) * nby, sort=False
Expand Down Expand Up @@ -2875,6 +2877,7 @@ def dask_groupby_scan(array, by, axes: T_Axes, agg: Scan) -> DaskArray:
ident=agg.identity,
x=zipped,
axis=axis,
# TODO: support method="sequential" here.
method="blelloch",
preop=partial(grouped_reduce, agg=agg),
dtype=agg.dtype,
Expand Down

0 comments on commit 6986d3f

Please sign in to comment.