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 d581d94 commit c061e6a
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 c061e6a

Please sign in to comment.