From 50a505fbeb57f82a3facea44cd04595b2c99c40c Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Sun, 22 Nov 2020 13:48:30 -0300 Subject: [PATCH] gauss more efficient --- Source Code - Seals/process/process.py | 64 ++++++++++++-------------- 1 file changed, 29 insertions(+), 35 deletions(-) diff --git a/Source Code - Seals/process/process.py b/Source Code - Seals/process/process.py index 968cd9c..eee2688 100644 --- a/Source Code - Seals/process/process.py +++ b/Source Code - Seals/process/process.py @@ -44,48 +44,42 @@ def identity(matrix): return matrix -def gauss(matrix): +def gauss(a): - i = 0 - k = 0 - - while (i < matrix.shape[0]): - - if (matrix[i][i] == 0): + for i in range(a.shape[0]): + + k = i + 1 + + while (k