diff options
author | Romain Tavenard <romain.tavenard@univ-rennes2.fr> | 2019-06-27 11:08:15 +0200 |
---|---|---|
committer | Romain Tavenard <romain.tavenard@univ-rennes2.fr> | 2019-06-27 11:08:15 +0200 |
commit | c92e595009ad5e2ae6d4b2c040556cffb6316847 (patch) | |
tree | 717e40eed0de6e35e302f3080ffc4eff349b3726 /test/test_ot.py | |
parent | bbc56e74bf119b8810c0de7b446bb01b30efc3c2 (diff) |
Wasserstein defined as the cost itself (do not return transportation matrix)
Diffstat (limited to 'test/test_ot.py')
-rw-r--r-- | test/test_ot.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/test_ot.py b/test/test_ot.py index 48423e7..3c4ac11 100644 --- a/test/test_ot.py +++ b/test/test_ot.py @@ -98,15 +98,11 @@ def test_wass_1d(): G, log = ot.emd([], [], M, log=True) wass = log["cost"] - G_1d, log = ot.wasserstein_1d(u, v, [], [], p=2., log=True) - wass1d = log["cost"] + wass1d = ot.wasserstein_1d(u, v, [], [], p=2.) # check loss is similar np.testing.assert_allclose(np.sqrt(wass), wass1d) - # check G is similar - np.testing.assert_allclose(G, G_1d) - def test_emd_empty(): # test emd and emd2 for simple identity |