From a65e9f9e0896c2655670d0cf1aa659dc8dcd0847 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 4 Jan 2022 14:55:32 +0100 Subject: [PATCH] cube vide --- app/comp/moy_ue.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/comp/moy_ue.py b/app/comp/moy_ue.py index 855e3b7f..d4022dd3 100644 --- a/app/comp/moy_ue.py +++ b/app/comp/moy_ue.py @@ -121,6 +121,8 @@ def notes_sem_assemble_cube(modimpls_notes: list[pd.DataFrame]) -> np.ndarray: (DataFrames rendus par compute_module_moy, (etud x UE)) Resultat: ndarray (etud x module x UE) """ + if len(modimpls_notes) == 0: + return np.zeros((0, 0, 0), dtype=float) modimpls_notes_arr = [df.values for df in modimpls_notes] modimpls_notes = np.stack(modimpls_notes_arr) # passe de (mod x etud x ue) à (etud x mod x UE)