From 653fd0084c529bc74dabf93c68a9bdd5ac8f377a Mon Sep 17 00:00:00 2001 From: alain Date: Mon, 24 Sep 2018 09:05:47 +0200 Subject: adding greenkhorn --- test/test_bregman.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_bregman.py b/test/test_bregman.py index c8e9179..03e38bf 100644 --- a/test/test_bregman.py +++ b/test/test_bregman.py @@ -71,12 +71,14 @@ def test_sinkhorn_variants(): Ges = ot.sinkhorn( u, u, M, 1, method='sinkhorn_epsilon_scaling', stopThr=1e-10) Gerr = ot.sinkhorn(u, u, M, 1, method='do_not_exists', stopThr=1e-10) + G_green = ot.sinkhorn(u, u, M, 1, method='greenkhorn', stopThr=1e-10) # check values np.testing.assert_allclose(G0, Gs, atol=1e-05) np.testing.assert_allclose(G0, Ges, atol=1e-05) np.testing.assert_allclose(G0, Gerr) - + np.testing.assert_allclose(G0, G_green, atol = 1e-32) + print(G0,G_green) def test_bary(): -- cgit v1.2.3 From f3433fda3e8f5c58ec1d7e5623825d4627435ebc Mon Sep 17 00:00:00 2001 From: RĂ©mi Flamary Date: Mon, 24 Sep 2018 10:09:00 +0200 Subject: working tests --- test/test_bregman.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test_bregman.py b/test/test_bregman.py index 03e38bf..52bbbd2 100644 --- a/test/test_bregman.py +++ b/test/test_bregman.py @@ -77,8 +77,9 @@ def test_sinkhorn_variants(): np.testing.assert_allclose(G0, Gs, atol=1e-05) np.testing.assert_allclose(G0, Ges, atol=1e-05) np.testing.assert_allclose(G0, Gerr) - np.testing.assert_allclose(G0, G_green, atol = 1e-32) - print(G0,G_green) + np.testing.assert_allclose(G0, G_green, atol=1e-5) + print(G0, G_green) + def test_bary(): -- cgit v1.2.3