Skip to content

Commit

Permalink
Update stats.py to avoid FutureWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
aulemahal authored Oct 17, 2024
1 parent df70d14 commit b26542e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xclim/indices/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ def reindex_time(da, da_ref, group):
da = da.rename(month="time").reindex(time=da_ref.time.dt.month)
da["time"] = da_ref.time
elif group == "time.week":
da = da.rename(week="time").reindex(time=da_ref.time.dt.week)
da = da.rename(week="time").reindex(time=da_ref.time.dt.isocalendar().week)
da["time"] = da_ref.time
# I don't think rechunking is necessary here, need to check
return da if not uses_dask(da) else da.chunk({"time": -1})
Expand Down

0 comments on commit b26542e

Please sign in to comment.