Skip to content

Commit

Permalink
Update time_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienIrving authored Sep 20, 2024
1 parent b35d33f commit b89df55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion unseen/time_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def temporal_aggregation(
diff = ds[time_dim].values[0] - start_time
ds[time_dim] = ds[time_dim] - diff
ds[time_dim] = ds[time_dim] + timedelta(days=1)
assert ds[time_dim].values[0].month == start_time.month
months = ds[time_dim].dt.month.values
assert np.all(months == start_time.month), "Problem with time reset"

if min_tsteps:
# Drop first and last time points with insufficient time steps
Expand Down

0 comments on commit b89df55

Please sign in to comment.