Skip to content

Commit 97fb398

Browse files
Format 3x3 matrix for better readability
1 parent e4ab155 commit 97fb398

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

linear_algebra/matrix_trace.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ def test_trace() -> None:
9191

9292
# Test 2: 3x3 matrix
9393
matrix_3x3 = np.array(
94-
[[2.0, -1.0, 3.0], [4.0, 5.0, -2.0], [1.0, 0.0, 7.0]], dtype=float
94+
[[2.0, -1.0, 3.0],
95+
[4.0, 5.0, -2.0],
96+
[1.0, 0.0, 7.0]],
97+
dtype=float
9598
)
9699
tr_3x3 = trace(matrix_3x3)
97100
assert abs(tr_3x3 - 14.0) < 1e-10, "3x3 trace calculation failed"

0 commit comments

Comments
 (0)