We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09fa705 commit 110517aCopy full SHA for 110517a
xarray/core/dataarray.py
@@ -6772,14 +6772,18 @@ def groupby(
6772
6773
_validate_groupby_squeeze(squeeze)
6774
6775
+ grouper: Grouper
6776
if group is not None:
- assert not groupers
6777
+ if not groupers:
6778
+ raise ValueError(
6779
+ "Providing a combination of `group` and **groupers is not supported."
6780
+ )
6781
grouper = UniqueGrouper()
6782
else:
6783
if len(groupers) > 1:
6784
raise ValueError("grouping by multiple variables is not supported yet.")
6785
if not groupers:
- raise ValueError
6786
+ raise ValueError("**groupers must be provided if `group` is not.")
6787
group, grouper = next(iter(groupers.items()))
6788
6789
rgrouper = ResolvedGrouper(grouper, group, self)
0 commit comments