Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 9-connect-scoringutil…
Browse files Browse the repository at this point in the history
…s-to-forecasttools
  • Loading branch information
AFg6K7h4fhy2 committed Nov 25, 2024
2 parents bfb64b5 + c96f216 commit e4c09a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions forecasttools/idata_w_dates_to_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ def add_time_coords_to_idata_dimension(
dimension=dimension,
time_step=time_step,
)
# will change when xarray supports
# numpy.dtype("datetime64[D]")
if not interval_dates.dtype == np.dtype("datetime64[ns]"):
interval_dates = interval_dates.astype("datetime64[ns]")
idata_group = idata_group.assign_coords({dimension: interval_dates})
setattr(idata, group, idata_group)
return idata
Expand Down

0 comments on commit e4c09a4

Please sign in to comment.