summaryrefslogtreecommitdiff
path: root/test/test_gromov.py
diff options
context:
space:
mode:
authortvayer <titouan.vayer@gmail.com>2019-05-29 17:19:13 +0200
committertvayer <titouan.vayer@gmail.com>2019-05-29 17:19:13 +0200
commit63093cef7af3350228251aa930872c6f30789432 (patch)
tree545e1e5efce5561e3bc1cc9e953018f1b62674a9 /test/test_gromov.py
parent28059eb5e0aad715823ee4f6509d6a9e3d6e5db0 (diff)
n_samples float
Diffstat (limited to 'test/test_gromov.py')
-rw-r--r--test/test_gromov.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_gromov.py b/test/test_gromov.py
index 3ca184b..d7a12f3 100644
--- a/test/test_gromov.py
+++ b/test/test_gromov.py
@@ -13,7 +13,7 @@ import ot
def test_gromov():
np.random.seed(42)
- n_samples = 50.0 # nb samples
+ n_samples = 50 # nb samples
mu_s = np.array([0, 0])
cov_s = np.array([[1, 0], [0, 1]])
@@ -39,7 +39,7 @@ def test_gromov():
np.testing.assert_allclose(
q, G.sum(0), atol=1e-04) # cf convergence gromov
- Id = (1 / n_samples) * np.eye(n_samples, n_samples)
+ Id = (1 / float(n_samples)) * np.eye(n_samples, n_samples)
np.testing.assert_allclose(
G, np.flipud(Id), atol=1e-04)
@@ -161,7 +161,7 @@ def test_gromov_entropic_barycenter():
def test_fgw():
np.random.seed(42)
- n_samples = 50.0 # nb samples
+ n_samples = 50 # nb samples
mu_s = np.array([0, 0])
cov_s = np.array([[1, 0], [0, 1]])
@@ -193,7 +193,7 @@ def test_fgw():
np.testing.assert_allclose(
q, G.sum(0), atol=1e-04) # cf convergence fgw
- Id = (1 / n_samples) * np.eye(n_samples, n_samples)
+ Id = (1 / float(n_samples)) * np.eye(n_samples, n_samples)
np.testing.assert_allclose(
G, np.flipud(Id), atol=1e-04) # cf convergence gromov