We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7d916e commit be71e2fCopy full SHA for be71e2f
linear_algebra/matrix_inversion.py
@@ -1,5 +1,6 @@
1
import numpy as np
2
3
+
4
def invert_matrix(matrix: list[list[float]]) -> list[list[float]]:
5
"""
6
Returns the inverse of a square matrix using NumPy.
@@ -19,10 +20,7 @@ def invert_matrix(matrix: list[list[float]]) -> list[list[float]]:
19
20
21
22
if __name__ == "__main__":
- mat = [
23
- [4, 7],
24
- [2, 6]
25
- ]
+ mat = [[4, 7], [2, 6]]
26
print("Original Matrix:")
27
print(mat)
28
print("Inverted Matrix:")
0 commit comments