diff options
author | Mokhtar Z. Alaya <mzalaya@sct-18-1bee-1581.univ-rouen.fr> | 2020-01-10 13:01:42 +0100 |
---|---|---|
committer | Mokhtar Z. Alaya <mzalaya@sct-18-1bee-1581.univ-rouen.fr> | 2020-01-10 13:01:42 +0100 |
commit | 365adbccc73f7fea28811b16cbbbdbb77761e55c (patch) | |
tree | a2a701ac312f293170c59426c7610c25a36a9065 /test/test_bregman.py | |
parent | 0461fb539b23d90d772fe5c4dd75463f915a1da5 (diff) |
add simple test for screenkhorn
Diffstat (limited to 'test/test_bregman.py')
-rw-r--r-- | test/test_bregman.py | 11 |
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 |