gauss more eficient
This commit is contained in:
BIN
Source Code - Seals/process/__pycache__/__init__.cpython-38.pyc
Normal file
BIN
Source Code - Seals/process/__pycache__/__init__.cpython-38.pyc
Normal file
Binary file not shown.
BIN
Source Code - Seals/process/__pycache__/process.cpython-38.pyc
Normal file
BIN
Source Code - Seals/process/__pycache__/process.cpython-38.pyc
Normal file
Binary file not shown.
@@ -61,16 +61,13 @@ def gauss(a):
|
|||||||
|
|
||||||
l += 1
|
l += 1
|
||||||
|
|
||||||
while (k < a.shape[0]):
|
|
||||||
|
|
||||||
if (a[k][i] == 0):
|
if (a[k][i] == 0):
|
||||||
|
while (k < a.shape[0]):
|
||||||
k += 1
|
k += 1
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
mult = a[k][i]/a[i][i]
|
a[k] = a[k] - (a[k][i]/a[i][i])*a[i]
|
||||||
a[k] = a[k] - mult*a[i]
|
|
||||||
k += 1
|
k += 1
|
||||||
|
|
||||||
i += 1
|
i += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user