From 1d86add40e64d5e2fb6c917567f9bd8b5cabac1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 25 May 2026 13:54:24 +0200 Subject: [PATCH] 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. --- quickadapter/user_data/strategies/Utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 " -- 2.53.0