summaryrefslogtreecommitdiff
path: root/test/test_gromov.py
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2020-07-09 08:49:39 +0200
committerGard Spreemann <gspr@nonempty.org>2020-07-09 08:49:39 +0200
commita16b9471d7114ec08977479b7249efe747702b97 (patch)
tree692f3061d0329cad954206b2bf903ba3384403f0 /test/test_gromov.py
parent0812fcd82cbf11d444619e96c55ba507bc09ef5d (diff)
parent94d5c8cc9046854f473d8e4526a3bcf214eb5411 (diff)
Merge tag '0.7.0' into dfsg/latest
Diffstat (limited to 'test/test_gromov.py')
-rw-r--r--test/test_gromov.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_gromov.py b/test/test_gromov.py
index 70fa83f..43da9fc 100644
--- a/test/test_gromov.py
+++ b/test/test_gromov.py
@@ -44,10 +44,14 @@ def test_gromov():
gw, log = ot.gromov.gromov_wasserstein2(C1, C2, p, q, 'kl_loss', log=True)
+ gw_val = ot.gromov.gromov_wasserstein2(C1, C2, p, q, 'kl_loss', log=False)
+
G = log['T']
np.testing.assert_allclose(gw, 0, atol=1e-1, rtol=1e-1)
+ np.testing.assert_allclose(gw, gw_val, atol=1e-1, rtol=1e-1) # cf log=False
+
# check constratints
np.testing.assert_allclose(
p, G.sum(1), atol=1e-04) # cf convergence gromov