From 0f4a1afdb62dc088c42b461b961a1202c798289c Mon Sep 17 00:00:00 2001 From: Tom Vo Date: Tue, 3 Sep 2024 14:14:24 -0700 Subject: [PATCH] Update xcdat/temporal.py --- xcdat/temporal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()