Skip to content

Commit 411d91b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 62b8c9f commit 411d91b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

matrix/matrix_operation.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ def permanent(matrix: list[list[int]]) -> Any:
148148
if len(matrix) == 1:
149149
return matrix[0][0]
150150

151-
return sum(
152-
x * permanent(minor(matrix, 0, i)) for i, x in enumerate(matrix[0])
153-
)
151+
return sum(x * permanent(minor(matrix, 0, i)) for i, x in enumerate(matrix[0]))
154152

155153

156154
def inverse(matrix: list[list[int]]) -> list[list[float]] | None:

0 commit comments

Comments
 (0)