From: Jérôme Benoit Date: Mon, 25 May 2026 11:54:24 +0000 (+0200) Subject: style(weights): rename fb_total to total in sanitize_and_renormalize fallback X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1d86add40e64d5e2fb6c917567f9bd8b5cabac1c;p=freqai-strategies.git style(weights): rename fb_total to total in sanitize_and_renormalize fallback The fb_ prefix referenced the fallback array but the variable sums the masked array. Use bare 'total' to match the primary path idiom. --- diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index a4bc025..68d03d3 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -749,9 +749,9 @@ def sanitize_and_renormalize( fallback = np.ones(n, dtype=float) if drop_mask is not None: masked = np.where(drop_mask, 0.0, fallback) - fb_total = masked.sum() - if fb_total > 0.0: - return masked * (n / fb_total) + total = masked.sum() + if total > 0.0: + return masked * (n / total) if logger is not None: logger.warning( "sanitize_and_renormalize: drop_mask covers all rows in "