From e235b08c2ac86f75b6c1b8e96e503305aa0449e1 Mon Sep 17 00:00:00 2001 From: Nathan Cassereau <84033440+ncassereau-idris@users.noreply.github.com> Date: Wed, 17 Nov 2021 11:16:24 +0100 Subject: [MRG] SinkhornL1L2Transport bug (#312) * solve bug * Linesearch no longer return None as alpha, only 0 --- test/test_optim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test_optim.py b/test/test_optim.py index 4efd9b1..41f9cbe 100644 --- a/test/test_optim.py +++ b/test/test_optim.py @@ -142,7 +142,7 @@ def test_line_search_armijo(nx): pk = np.array([[-0.25, 0.25], [0.25, -0.25]]) gfk = np.array([[23.04273441, 23.0449082], [23.04273441, 23.0449082]]) old_fval = -123 - # Should not throw an exception and return None for alpha + # Should not throw an exception and return 0. for alpha alpha, a, b = ot.optim.line_search_armijo( lambda x: 1, nx.from_numpy(xk), nx.from_numpy(pk), nx.from_numpy(gfk), old_fval ) @@ -151,7 +151,7 @@ def test_line_search_armijo(nx): ) assert a == anp assert b == bnp - assert alpha is None + assert alpha == 0. # check line search armijo def f(x): -- cgit v1.2.3