Skip to content

Commit 3e54f33

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4b8b24d commit 3e54f33

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

linear_algebra/determinant.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
def determinant_recursive(matrix: NDArray[float64]) -> float:
1616
"""
17-
Calculate the determinant of a square matrix
17+
Calculate the determinant of a square matrix
1818
using recursive cofactor expansion.
19-
This method is suitable for
19+
This method is suitable for
2020
small matrices but becomes inefficient for large matrices.
2121
Parameters:
2222
matrix (NDArray[float64]): A square matrix
@@ -62,7 +62,7 @@ def determinant_recursive(matrix: NDArray[float64]) -> float:
6262
def determinant_lu(matrix: NDArray[float64]) -> float:
6363
"""
6464
Calculate the determinant using LU decomposition.
65-
This method is more efficient for larger matrices
65+
This method is more efficient for larger matrices
6666
than recursive expansion.
6767
Parameters:
6868
matrix (NDArray[float64]): A square matrix
@@ -119,9 +119,9 @@ def determinant_lu(matrix: NDArray[float64]) -> float:
119119

120120
def determinant(matrix: NDArray[float64]) -> float:
121121
"""
122-
Calculate the determinant of a square matrix using
122+
Calculate the determinant of a square matrix using
123123
the most appropriate method.
124-
Uses recursive expansion for small matrices (≤3x3)
124+
Uses recursive expansion for small matrices (≤3x3)
125125
and LU decomposition for larger ones.
126126
Parameters:
127127
matrix (NDArray[float64]): A square matrix

0 commit comments

Comments
 (0)