summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNathan Cassereau <84033440+ncassereau-idris@users.noreply.github.com>2021-11-17 11:16:24 +0100
committerGitHub <noreply@github.com>2021-11-17 11:16:24 +0100
commite235b08c2ac86f75b6c1b8e96e503305aa0449e1 (patch)
tree8699a99ef206f38cf4d6673b25f100441fa9cf32 /test
parentf4b363d865a79c07248176c1e36990e0cb6814ea (diff)
[MRG] SinkhornL1L2Transport bug (#312)
* solve bug * Linesearch no longer return None as alpha, only 0
Diffstat (limited to 'test')
-rw-r--r--test/test_optim.py4
1 files changed, 2 insertions, 2 deletions
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):