13
13
def test_gromov ():
14
14
np .random .seed (42 )
15
15
16
- n_samples = 50.0 # nb samples
16
+ n_samples = 50 # nb samples
17
17
18
18
mu_s = np .array ([0 , 0 ])
19
19
cov_s = np .array ([[1 , 0 ], [0 , 1 ]])
@@ -39,7 +39,7 @@ def test_gromov():
39
39
np .testing .assert_allclose (
40
40
q , G .sum (0 ), atol = 1e-04 ) # cf convergence gromov
41
41
42
- Id = (1 / n_samples ) * np .eye (n_samples , n_samples )
42
+ Id = (1 / float ( n_samples ) ) * np .eye (n_samples , n_samples )
43
43
44
44
np .testing .assert_allclose (
45
45
G , np .flipud (Id ), atol = 1e-04 )
@@ -161,7 +161,7 @@ def test_gromov_entropic_barycenter():
161
161
def test_fgw ():
162
162
np .random .seed (42 )
163
163
164
- n_samples = 50.0 # nb samples
164
+ n_samples = 50 # nb samples
165
165
166
166
mu_s = np .array ([0 , 0 ])
167
167
cov_s = np .array ([[1 , 0 ], [0 , 1 ]])
@@ -193,7 +193,7 @@ def test_fgw():
193
193
np .testing .assert_allclose (
194
194
q , G .sum (0 ), atol = 1e-04 ) # cf convergence fgw
195
195
196
- Id = (1 / n_samples ) * np .eye (n_samples , n_samples )
196
+ Id = (1 / float ( n_samples ) ) * np .eye (n_samples , n_samples )
197
197
198
198
np .testing .assert_allclose (
199
199
G , np .flipud (Id ), atol = 1e-04 ) # cf convergence gromov
0 commit comments