From 629b625ce23e4fe4e6851bb52e077e2f69923208 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 13 Dec 2025 22:41:14 +0100 Subject: [PATCH] docs: add code comment MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- quickadapter/user_data/strategies/Utils.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index f0e6052..bcd8ece 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -860,13 +860,16 @@ def compute_extrema_weights( if len(indices) == 0 or strategy == WEIGHT_STRATEGIES[0]: # "none" return pd.Series(DEFAULT_EXTREMA_WEIGHT, index=extrema.index) - if strategy in { - WEIGHT_STRATEGIES[1], - WEIGHT_STRATEGIES[2], - WEIGHT_STRATEGIES[3], - WEIGHT_STRATEGIES[4], - WEIGHT_STRATEGIES[5], - }: + if ( + strategy + in { + WEIGHT_STRATEGIES[1], + WEIGHT_STRATEGIES[2], + WEIGHT_STRATEGIES[3], + WEIGHT_STRATEGIES[4], + WEIGHT_STRATEGIES[5], + } + ): # "amplitude" / "amplitude_threshold_ratio" / "volume" / "speed" / "efficiency_ratio" if strategy == WEIGHT_STRATEGIES[1]: # "amplitude" weights = np.asarray(amplitudes, dtype=float) elif strategy == WEIGHT_STRATEGIES[2]: # "amplitude_threshold_ratio" -- 2.43.0