Skip to content

Commit

Permalink
fix types.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jun 21, 2024
1 parent ab2700b commit 436997b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -6772,14 +6772,18 @@ def groupby(

_validate_groupby_squeeze(squeeze)

grouper: Grouper
if group is not None:
assert not groupers
if not groupers:
raise ValueError(
"Providing a combination of `group` and **groupers is not supported."
)
grouper = UniqueGrouper()
else:
if len(groupers) > 1:
raise ValueError("grouping by multiple variables is not supported yet.")
if not groupers:
raise ValueError
raise ValueError("**groupers must be provided if `group` is not.")
group, grouper = next(iter(groupers.items()))

rgrouper = ResolvedGrouper(grouper, group, self)
Expand Down

0 comments on commit 436997b

Please sign in to comment.