Commit d4f2b0f7 authored by Clément Haëck's avatar Clément Haëck
Browse files

Fix 8Days resample

set of years could be unsorted
parent d3cbbd8b
......@@ -221,7 +221,7 @@ def resample_8D_multiple_years(ds, days=8):
year can thus be smaller.
"""
ts = pd.DatetimeIndex([])
for year in set(ds.time.dt.year.values):
for year in sorted(list(set(ds.time.dt.year.values))):
ts = ts.append(pd.date_range('{}/01/01'.format(year),
freq='{}D'.format(days),
periods=365//days))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment