mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 10:31:29 +08:00
Add flake8-builtins to pre-commit and fix errors (#7105)
Ignore `A003` Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
This commit is contained in:
@ -33,11 +33,11 @@ def retroactive_resolution(
|
||||
|
||||
x: NDArray[float64] = np.zeros((rows, 1), dtype=float)
|
||||
for row in reversed(range(rows)):
|
||||
sum = 0
|
||||
total = 0
|
||||
for col in range(row + 1, columns):
|
||||
sum += coefficients[row, col] * x[col]
|
||||
total += coefficients[row, col] * x[col]
|
||||
|
||||
x[row, 0] = (vector[row] - sum) / coefficients[row, row]
|
||||
x[row, 0] = (vector[row] - total) / coefficients[row, row]
|
||||
|
||||
return x
|
||||
|
||||
|
Reference in New Issue
Block a user