Skip to content

Commit

Permalink
Update xcdat/temporal.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder authored Sep 3, 2024
1 parent 22312a5 commit 0f4a1af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xcdat/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ def _get_weights(self, time_bounds: xr.DataArray) -> xr.DataArray:
if isinstance(time_lengths.data, Array):
time_lengths = time_lengths.astype("timedelta64[ns]")

time_lengths = time_lengths.astype("float64")
time_lengths = time_lengths.astype(np.float64)

grouped_time_lengths = self._group_data(time_lengths)
weights: xr.DataArray = grouped_time_lengths / grouped_time_lengths.sum()
Expand Down

0 comments on commit 0f4a1af

Please sign in to comment.