Here's my code
import numpy as np
contrainte1= 1080*0.65 # minutes tous les jours
contrainte2= 720*0.55 # minutes du lundi au vendredi
X=np.array([[9, 48],[12, 46],[14, 41],[12, 45],[6, 50],[10, 48],[25, 12],[26, 15],[30, 10],[31, 16],[40, 10],[41, 12],[35, 18],[35, 19],[30, 21],[28, 21],[25, 24],[21, 28],[22, 30],[25, 26],[26, 25],[30, 20],[32, 16],[35, 12]])<
#La première position représente la contrainte 1
#La deuxième position représente la contraire 2
# contrainte 1
for i in X[-19:]:
print(i)
for y in #This is where I need help
If I understood you, you just want to sum elements in the first column? All that needs is a little indexing and sum
:
In [19]: X[:, 0].sum()
Out[19]: 600