From 514623e8cf239b62f39c933b8d4dceb5c51de152 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 30 Jan 2022 09:37:06 +0100 Subject: [PATCH] Bonus: clip > 0 cas DUT/no max --- app/comp/bonus_spo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/comp/bonus_spo.py b/app/comp/bonus_spo.py index e9f615cf5a..f8e82e4146 100644 --- a/app/comp/bonus_spo.py +++ b/app/comp/bonus_spo.py @@ -211,6 +211,8 @@ class BonusSportAdditif(BonusSport): bonus_moy_arr = np.clip( bonus_moy_arr, 0.0, self.bonus_max, out=bonus_moy_arr ) + else: # necessaire pour éviter bonus négatifs ! + bonus_moy_arr = np.clip(bonus_moy_arr, 0.0, 20.0, out=bonus_moy_arr) # en APC, bonus_moy_arr est (nb_etuds, nb_ues_non_bonus) if self.formsemestre.formation.is_apc() or self.classic_use_bonus_ues: