summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMokhtar Z. Alaya <mzalaya@sct-18-1bee-1581.univ-rouen.fr>2020-01-10 13:01:42 +0100
committerMokhtar Z. Alaya <mzalaya@sct-18-1bee-1581.univ-rouen.fr>2020-01-10 13:01:42 +0100
commit365adbccc73f7fea28811b16cbbbdbb77761e55c (patch)
treea2a701ac312f293170c59426c7610c25a36a9065 /test
parent0461fb539b23d90d772fe5c4dd75463f915a1da5 (diff)
add simple test for screenkhorn
Diffstat (limited to 'test')
-rw-r--r--test/test_bregman.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_bregman.py b/test/test_bregman.py
index f70df10..eb74a9f 100644
--- a/test/test_bregman.py
+++ b/test/test_bregman.py
@@ -337,3 +337,14 @@ def test_implemented_methods():
ot.bregman.sinkhorn(a, b, M, epsilon, method=method)
with pytest.raises(ValueError):
ot.bregman.sinkhorn2(a, b, M, epsilon, method=method)
+
+def test_screenkhorn():
+ # test screenkhorn
+ rng = np.random.RandomState(0)
+ n = 100
+ a = ot.unif(n)
+ b = ot.unif(n)
+
+ x = rng.randn(n, 2)
+ M = ot.dist(x, x)
+ G_screen = ot.bregman.screenkhorn(a, b, M, 1e-1) \ No newline at end of file