Skip to content
Snippets Groups Projects
Commit 68411318 authored by lucien.noel's avatar lucien.noel
Browse files

méthode pour calculer c terminé

parent 36e26f0b
No related branches found
No related tags found
No related merge requests found
......@@ -255,12 +255,20 @@ def fusion_tab_init(tab,c, b, f):
tab_init[i][j] = b[i]
else:
tab_init[i][j] = tab[i][j]
return tab_init
def calcule_b_aux(b):
for x,i in enumerate(b):
b[i] = numpy.abs(x)
return b
# def calcule_c_aux():
def calcule_c_aux(tab):
c_aux = numpy.zeros(len(tab[0]))
for i in range(len(tab)):
for j in range(len(tab[0])):
c_aux[j] += tab[i][j]
return c_aux
if __name__ == "__main__":
......@@ -281,7 +289,10 @@ if __name__ == "__main__":
id_test = calcule_tab_identite(tab)
print("test :")
print(fusion_tab(tab, id_test))
tab_test = fusion_tab(tab, id_test)
print(tab_test)
c_aux = calcule_c_aux(tab_test)
print(c_aux)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment