Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jul 18, 2024
1 parent 5ad66c3 commit 0a4395a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xarray/core/groupers.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,9 @@ def _get_index_and_items(self) -> tuple[pd.Index, pd.Series, np.ndarray]:

def first_items(self) -> tuple[pd.Series, np.ndarray]:
from xarray.coding.cftimeindex import CFTimeIndex
from xarray.core.resample_cftime import CFTimeGrouper

if isinstance(self.group_as_index, CFTimeIndex):
if isinstance(self.index_grouper, CFTimeGrouper):
return self.index_grouper.first_items(
cast(CFTimeIndex, self.group_as_index)
)
Expand Down

0 comments on commit 0a4395a

Please sign in to comment.