1
0
forked from ScoDoc/ScoDoc

Gestion erreur si lancement des calculs avec... 0 UEs

This commit is contained in:
Emmanuel Viennet 2022-01-31 22:46:18 +01:00
parent f85deecb64
commit 0d97d5bfc6

View File

@ -233,6 +233,8 @@ class ModuleImplResultsAPC(ModuleImplResults):
assert evals_poids_df.shape[0] == nb_evals # compat notes/poids assert evals_poids_df.shape[0] == nb_evals # compat notes/poids
if nb_etuds == 0: if nb_etuds == 0:
return pd.DataFrame(index=[], columns=evals_poids_df.columns) return pd.DataFrame(index=[], columns=evals_poids_df.columns)
if nb_ues == 0:
return pd.DataFrame(index=self.evals_notes.index, columns=[])
evals_coefs = self.get_evaluations_coefs(moduleimpl) evals_coefs = self.get_evaluations_coefs(moduleimpl)
evals_poids = evals_poids_df.values * evals_coefs evals_poids = evals_poids_df.values * evals_coefs
# -> evals_poids shape : (nb_evals, nb_ues) # -> evals_poids shape : (nb_evals, nb_ues)