Skip to content

Commit bc7e9bb

Browse files
committed
Fix failing test
1 parent b4f5490 commit bc7e9bb

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Diff for: tests/numpy/linalg.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,18 @@
106106
ref_result = 16.881943016134134
107107
print(math.isclose(result, ref_result, rel_tol=1E-6, abs_tol=1E-6))
108108

109-
110109
a = np.array([[0, 1, 2], [3, 4 ,5], [5, 4, 8], [4, 4, 8] ], dtype=np.int16)
111-
result = (np.linalg.norm(a,axis=0)) # fails on low tolerance when result >10?
110+
result = (np.linalg.norm(a,axis=0)) # fails on low tolerance
112111
ref_result = np.array([7.071068, 7.0, 12.52996])
113112
for i in range(3):
114113
print(math.isclose(result[i], ref_result[i], rel_tol=1E-6, abs_tol=1E-6))
115114

116115
a = np.array([[0, 1, 2], [3, 4 ,5], [5, 4, 8], [4, 4, 8] ], dtype=np.int16)
117-
result = (np.linalg.norm(a,axis=1)). # fails on low tolerance when result >10?
116+
result = (np.linalg.norm(a,axis=1)) # fails on low tolerance
118117
ref_result = np.array([2.236068, 7.071068, 10.24695, 9.797959])
119118
for i in range(4):
120119
print(math.isclose(result[i], ref_result[i], rel_tol=1E-6, abs_tol=1E-6))
121-
120+
122121
if use_ulab:
123122
print(np.linalg.trace(np.eye(3)))
124123
else:

Diff for: tests/numpy/linalg.py.exp

+7
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,11 @@ True
4444
True
4545
True
4646
True
47+
True
48+
True
49+
True
50+
True
51+
True
52+
True
53+
True
4754
3.0

0 commit comments

Comments
 (0)