Skip to content

Commit

Permalink
Cleanup groups
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Aug 16, 2024
1 parent 0513e64 commit 2f844f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions xarray/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,7 @@ def groups(self) -> dict[GroupKey, GroupIndex]:
"""
# provided to mimic pandas.groupby
if self._groups is None:
self._raise_if_not_single_group()
(grouper,) = self.groupers
self._groups = dict(zip(grouper.unique_coord.values, self._group_indices))
self._groups = dict(zip(self._unique_coord.data, self._group_indices))
return self._groups

def __getitem__(self, key: GroupKey) -> T_Xarray:
Expand Down

0 comments on commit 2f844f6

Please sign in to comment.