diff --git a/xcdat/temporal.py b/xcdat/temporal.py index dbdd1203..afd3c994 100644 --- a/xcdat/temporal.py +++ b/xcdat/temporal.py @@ -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()