From 2d5d2e336cfd69e445b2fe6035d6897a3f10193c Mon Sep 17 00:00:00 2001 From: Alexey Pechnikov Date: Mon, 8 Jul 2024 01:09:22 +0700 Subject: [PATCH] Use float32 output datatype for regression_pairs() --- pygmtsar/pygmtsar/Stack_detrend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmtsar/pygmtsar/Stack_detrend.py b/pygmtsar/pygmtsar/Stack_detrend.py index d608e411..a7a4b954 100644 --- a/pygmtsar/pygmtsar/Stack_detrend.py +++ b/pygmtsar/pygmtsar/Stack_detrend.py @@ -370,7 +370,7 @@ def regression_pairs(self, data, weight=None, degree=0, days=None, count=None): .swap_dims({'pair': 'time'})\ .sortby(['ref', 'rep'])\ .polyfit(dim='time', deg=degree) - model = linear_fit.polyfit_coefficients.sel(degree=degree) + model = linear_fit.polyfit_coefficients.sel(degree=degree).astype(np.float32) models.append(model.assign_coords(date=pd.to_datetime(date))) del data_pairs, stack, stack_days, stack_days_selected, linear_fit, model model = xr.concat(models, dim='date')