From 365adbccc73f7fea28811b16cbbbdbb77761e55c Mon Sep 17 00:00:00 2001 From: "Mokhtar Z. Alaya" Date: Fri, 10 Jan 2020 13:01:42 +0100 Subject: add simple test for screenkhorn --- test/test_bregman.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') 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 -- cgit v1.2.3