Skip to content

Commit

Permalink
Use float32 output datatype for regression_pairs()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyPechnikov committed Jul 7, 2024
1 parent fbca8fa commit 2d5d2e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygmtsar/pygmtsar/Stack_detrend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 2d5d2e3

Please sign in to comment.