Debian Codegraph @

debian/patches/0001-Allow-non-zero-atol-in-allclose-in-test.patch

raw
1 From: Gard Spreemann <[email protected]>
2 Date: Thu, 18 Apr 2024 14:43:00 +0200
3 Subject: Allow non-zero atol in allclose in test
4
5 This is to work around bug #1068647 until upstream fixes issue 618
6 [1].
7
8 [1] https://github.com/PythonOT/POT/issues/618
9 ---
10 test/test_solvers.py | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13 diff --git a/test/test_solvers.py b/test/test_solvers.py
14 index 82a402d..e586b78 100644
15 --- a/test/test_solvers.py
16 +++ b/test/test_solvers.py
17 @@ -597,7 +597,7 @@ def test_solve_sample_methods(nx, method_params):
18
19 sol2 = ot.solve_sample(x, x, **method_params)
20 if method_params["method"] not in ["factored", "lowrank"]:
21 - np.testing.assert_allclose(sol2.value, 0)
22 + np.testing.assert_allclose(sol2.value, 0, atol=1e-5)
23
24
25 @pytest.mark.parametrize("method_params", lst_parameters_solve_sample_NotImplemented)