Skip to content

Commit

Permalink
Fix resampling
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Mar 30, 2023
1 parent c6bfdaa commit a2290aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xarray/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,12 @@ def __init__(

def _resolve_group(self, obj, group_name):
from xarray import CFTimeIndex
from xarray.core.resample import RESAMPLE_DIM
from xarray.core.resample_cftime import CFTimeGrouper

group = obj[group_name]
group = obj[group_name].reset_coords(drop=True)
obj = obj.drop_vars(RESAMPLE_DIM)

self.group = group
self._group_as_index = safe_cast_to_index(group)
group_as_index = self._group_as_index
Expand Down

0 comments on commit a2290aa

Please sign in to comment.