Skip to content

Commit dc59c32

Browse files
committed
Formatting for pre-commit actions / tests
1 parent 5fa4f9f commit dc59c32

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ibicus/debias/_scaled_distribution_mapping.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,14 @@ def _apply_on_window_absolute_sdm(self, obs, cm_hist, cm_future):
424424
reverse_sorting_idx = np.argsort(argsort_cm_future)
425425

426426
# Note: this transformation follows the reference implementation referred to in the paper, rather than the algorithm description which differs.
427-
# Detrending does zero centering, which means that trend is centered on np.mean(cm_future) and bias_corrected is centered around zero.
427+
# Detrending does zero centering, which means that trend is centered on np.mean(cm_future) and bias_corrected is centered around zero.
428428
# To this the observational mean is added and this transformation then corresponds to a linear scaling of the mean.
429-
return bias_corrected[reverse_sorting_idx] + trend + np.mean(obs) - np.mean(cm_hist)
429+
return (
430+
bias_corrected[reverse_sorting_idx]
431+
+ trend
432+
+ np.mean(obs)
433+
- np.mean(cm_hist)
434+
)
430435

431436
def apply_on_window(self, obs, cm_hist, cm_future, **kwargs):
432437
if self.mapping_type == "absolute":

0 commit comments

Comments
 (0)