Skip to content

Commit 4c633a5

Browse files
author
Joao Felipe Rocha
committed
Make the atol on np assert_all_close 10-12.
1 parent c9ad75e commit 4c633a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_knn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ def test_knn_graph_fixed_bandwidth():
370370
)
371371
assert isinstance(G2, graphtools.graphs.kNNGraph)
372372
np.testing.assert_array_equal(G.N, G2.N)
373-
np.testing.assert_allclose(G.dw, G2.dw, atol=1e-14)
373+
np.testing.assert_allclose(G.dw, G2.dw, atol=1e-12)
374374
np.testing.assert_allclose(
375-
(G.W - G2.W).data, np.zeros_like((G.W - G2.W).data), atol=1e-14
375+
(G.W - G2.W).data, np.zeros_like((G.W - G2.W).data), atol=1e-12
376376
)
377377

378378

@@ -454,8 +454,8 @@ def test_knn_graph_anisotropy():
454454
)
455455
assert isinstance(G2, graphtools.graphs.kNNGraph)
456456
assert G.N == G2.N
457-
np.testing.assert_allclose(G.dw, G2.dw, atol=1e-14, rtol=1e-14)
458-
np.testing.assert_allclose((G2.W - G.W).data, 0, atol=1e-14, rtol=1e-14)
457+
np.testing.assert_allclose(G.dw, G2.dw, atol=1e-12, rtol=1e-12)
458+
np.testing.assert_allclose((G2.W - G.W).data, 0, atol=1e-12, rtol=1e-12)
459459

460460

461461
#####################################################

0 commit comments

Comments
 (0)