diff options
author | RĂ©mi Flamary <remi.flamary@gmail.com> | 2020-03-13 15:33:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 15:33:02 +0100 |
commit | 599154c22f98eb7c0c5d3f97a6858c474b14dbdd (patch) | |
tree | 9b5b5bb699eac9a24f222e72c42a6e18549fd7c1 /test/test_bregman.py | |
parent | 0baf83bbff6bd0c67244b3019509fe7518fb2d75 (diff) | |
parent | d82e6eb1af99a982a4934d6bc019a9ab4ad5c880 (diff) |
Merge pull request #132 from atong01/atong-fix-convolutional-barycenter
[MRG] Fix convolutional_barycenter2d kernel for non-symmetric images
Diffstat (limited to 'test/test_bregman.py')
-rw-r--r-- | test/test_bregman.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_bregman.py b/test/test_bregman.py index f54ba9f..ec4388d 100644 --- a/test/test_bregman.py +++ b/test/test_bregman.py @@ -351,3 +351,10 @@ def test_screenkhorn(): # check marginals np.testing.assert_allclose(G_sink.sum(0), G_screen.sum(0), atol=1e-02) np.testing.assert_allclose(G_sink.sum(1), G_screen.sum(1), atol=1e-02) + + +def test_convolutional_barycenter_non_square(): + # test for image with height not equal width + A = np.ones((2, 2, 3)) / (2 * 3) + b = ot.bregman.convolutional_barycenter2d(A, 1e-03) + np.testing.assert_allclose(np.ones((2, 3)) / (2 * 3), b, atol=1e-02) |