Skip to content

Commit

Permalink
infer_freq: return 'YE' (#8629 follow-up)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathause committed Jan 22, 2024
1 parent 5a92d48 commit bcc09ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xarray/coding/frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _get_annual_rule(self):
if len(np.unique(self.index.month)) > 1:
return None

return {"cs": "YS", "ce": "Y"}.get(month_anchor_check(self.index))
return {"cs": "YS", "ce": "YE"}.get(month_anchor_check(self.index))

def _get_quartely_rule(self):
if len(self.month_deltas) > 1:
Expand Down
2 changes: 1 addition & 1 deletion xarray/tests/test_cftimeindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ def test_infer_freq_invalid_inputs():
"freq",
[
"300YS-JAN",
"Y-DEC",
"YE-DEC",
"YS-JUL",
"2YS-FEB",
"QE-NOV",
Expand Down

0 comments on commit bcc09ae

Please sign in to comment.