From f264bc438fc0d1ac5a26c6041932b420d3dd0437 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 18 Mar 2022 22:40:04 +0100 Subject: [PATCH] Fix: moy gen. quand aucune note avec skip_empty_ues --- app/comp/moy_sem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/comp/moy_sem.py b/app/comp/moy_sem.py index 2b73b9df4..23e989d95 100644 --- a/app/comp/moy_sem.py +++ b/app/comp/moy_sem.py @@ -68,7 +68,7 @@ def compute_sem_moys_apc_using_ects( try: if skip_empty_ues: # annule les coefs des UE sans notes (NaN) - ects = np.where(etud_moy_ue_df.isna(), 0, np.array(ects)) + ects = np.where(etud_moy_ue_df.isna(), 0.0, np.array(ects, dtype=float)) # ects est devenu nb_etuds x nb_ues moy_gen = (etud_moy_ue_df * ects).sum(axis=1) / ects.sum(axis=1) else: