Skip to content

Commit 3788eb5

Browse files
committed
Fix flake8 linting errors in test_gemm.py
- Remove trailing whitespace from blank lines - Fix line length violations by breaking long lines appropriately - Fix indentation for continuation lines - Maintain functionality while ensuring PEP 8 compliance
1 parent 089586d commit 3788eb5

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

tests/test_gemm.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,29 +89,33 @@ def test_eye_method(self):
8989
"""Test eye method creates correct identity matrices"""
9090
# Test cases: different sizes
9191
test_sizes = [1, 2, 3, 4, 5, 10]
92-
92+
9393
for size in test_sizes:
9494
with self.subTest(size=size):
9595
# Create identity matrix using our eye method
9696
identity = self.SimpleArray.eye(size)
97-
97+
9898
# Create expected identity matrix using NumPy
9999
expected = np.eye(size, dtype=self.dtype)
100-
100+
101101
# Check shape
102102
self.assertEqual(list(identity.shape), [size, size])
103-
103+
104104
# Check array values
105-
np.testing.assert_array_almost_equal(identity.ndarray, expected)
106-
107-
# Verify diagonal and off-diagonal elements explicitly using product
105+
np.testing.assert_array_almost_equal(identity.ndarray,
106+
expected)
107+
108+
# Verify diagonal and off-diagonal elements explicitly
109+
# using product
108110
for i, j in product(range(size), repeat=2):
109111
if i == j:
110-
self.assertEqual(identity[i, j], 1.0,
111-
f"Diagonal element ({i},{j}) should be 1.0")
112+
self.assertEqual(identity[i, j], 1.0,
113+
f"Diagonal element ({i},{j}) "
114+
f"should be 1.0")
112115
else:
113116
self.assertEqual(identity[i, j], 0.0,
114-
f"Off-diagonal element ({i},{j}) should be 0.0")
117+
f"Off-diagonal element ({i},{j}) "
118+
f"should be 0.0")
115119

116120
def test_zero_matrix(self):
117121
"""Test multiplication with zero matrix"""

0 commit comments

Comments
 (0)