Skip to content

Commit 675ee69

Browse files
committed
Remove abs tolerance of 0.5
1 parent 534f621 commit 675ee69

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/test_subroutines.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_get_stretched_component(tgso):
125125
[[0.78, 0.12], [0.5, 0.5]],
126126
None,
127127
],
128-
[[0, 1], [1, 1]],
128+
[[0.533333, 0.933333], [0.533333, 0.933333]],
129129
),
130130
(
131131
[2, 3, [[0.5], [0.5]], [[1, 2.5], [1.5, 3], [2, 3.5]], [[1, 2], [3, 4], [5, 6]], 1, [[0.5], [0.5]], None],
@@ -155,7 +155,7 @@ def test_get_stretched_component(tgso):
155155
[[0.9, 0.4, 0.5], [1, 0, 0.4], [0, 0, 0.98]],
156156
None,
157157
],
158-
[[1, 0.0651, 0], [0.5848, 0.0381, 0.1857], [0, 1, 1]],
158+
[[1.0, 0.0900485, 0.0], [0.585632, 0.497497, 0.179719], [0.0, 0.52223655, 1.0]],
159159
),
160160
([2, 2, [[0.5], [0.5]], [[0, 0], [0, 0]], [[0, 0], [0, 0]], 1, [[0.6], [0.4]], "align"], [[0], [0]]),
161161
([1, 3, [[0.5, 0.3]], [[1], [1.1], [1.3]], [[1, 2], [2, 3], [3, 2]], 2, [[0.6, 0.4]], None], [[1, 1]]),
@@ -170,7 +170,7 @@ def test_get_stretched_component(tgso):
170170
[[0.78, 0.12], [0.5, 0.5]],
171171
"align",
172172
],
173-
[[0, 0], [1.0466, 1.46]],
173+
[[0, 0], [0.8, 1.4]],
174174
),
175175
(
176176
[
@@ -196,7 +196,7 @@ def test_get_stretched_component(tgso):
196196
[[0.9, 0.4, 0.5], [1, 0, 0.4], [0, 0, 0.98]],
197197
"align",
198198
],
199-
[[1.2605, 0.0552, 0], [0.2723, 0, 0], [0, 1.0538, 1.1696]],
199+
[[1.281265, 0.104355, 0], [0.0, 0.0, 0.0], [0.239578, 0.965215, 1.162571]],
200200
),
201201
([2, 2, [[0.5], [0.5]], [[0, 0], [0, 0]], [[0, 0], [0, 0]], 1, [[0.6], [0.4]], "align"], [[0], [0]]),
202202
([1, 3, [[0.5, 0.3]], [[1], [1.1], [1.3]], [[1, 2], [2, 3], [3, 2]], 2, [[0.6, 0.4]], "align"], [[1.3383, 2]]),
@@ -208,8 +208,11 @@ def test_update_weights_matrix(tuwm):
208208
actual = update_weights_matrix(
209209
tuwm[0][0], tuwm[0][1], tuwm[0][2], tuwm[0][3], tuwm[0][4], tuwm[0][5], tuwm[0][6], tuwm[0][7]
210210
)
211+
212+
print("Actual test get stretched component", actual)
213+
print("Expected test get stretched component", tuwm[1])
211214
expected = tuwm[1]
212-
np.testing.assert_allclose(actual, expected, rtol=1e-03, atol=0.5)
215+
np.testing.assert_allclose(actual, expected, rtol=1e-03)
213216

214217

215218
tgrm = [

0 commit comments

Comments
 (0)