gauss more eficient

This commit is contained in:
2020-11-23 11:02:02 -03:00
parent b7520c61a5
commit 4b1eee68e7
3 changed files with 6 additions and 9 deletions

View File

@@ -61,16 +61,13 @@ def gauss(a):
l += 1
while (k < a.shape[0]):
if (a[k][i] == 0):
while (k < a.shape[0]):
k += 1
else:
mult = a[k][i]/a[i][i]
a[k] = a[k] - mult*a[i]
a[k] = a[k] - (a[k][i]/a[i][i])*a[i]
k += 1
i += 1