Skip to content

Commit e8e52b7

Browse files
authored
Clean up comments in Gauss-Seidel method
Removed comments related to convergence check and result rounding.
1 parent e963383 commit e8e52b7

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

maths/numerical_analysis/gauss_seidel_method.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ def gauss_seidel(
3535
sum_after = sum(coefficients[i][j] * x[j] for j in range(i + 1, n))
3636
x_new[i] = (rhs[i] - sum_before - sum_after) / coefficients[i][i]
3737

38-
# Convergence check
3938
if all(abs(x_new[i] - x[i]) < tol for i in range(n)):
40-
# Return rounded results for stable test comparison
4139
return [round(val, 10) for val in x_new]
4240

4341
x = x_new

0 commit comments

Comments
 (0)