forked from ScoDoc/ScoDoc
Fix: calcul moyenne générale BUT si aucune UE
This commit is contained in:
parent
8f11a8f8cb
commit
7cf253e614
@ -78,7 +78,11 @@ def compute_sem_moys_apc_using_ects(
|
||||
else:
|
||||
ects = ects_df.to_numpy()
|
||||
# ects est maintenant un array nb_etuds x nb_ues
|
||||
|
||||
moy_gen = (etud_moy_ue_df * ects).sum(axis=1) / ects.sum(axis=1)
|
||||
except ZeroDivisionError:
|
||||
# peut arriver si aucun module... on ignore
|
||||
moy_gen = pd.Series(np.NaN, index=etud_moy_ue_df.index)
|
||||
except TypeError:
|
||||
if None in ects:
|
||||
formation = db.session.get(Formation, formation_id)
|
||||
|
@ -260,7 +260,7 @@ class AssiduitesMetrics:
|
||||
"""Labels associés au métrique de l'assiduité"""
|
||||
|
||||
SHORT: list[str] = ["1/2 J.", "J.", "H."]
|
||||
LONG: list[str] = ["Demi-Journée", "Journée", "Heure"]
|
||||
LONG: list[str] = ["Demi-journée", "Journée", "Heure"]
|
||||
TAG: list[str] = ["demi", "journee", "heure"]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user