()
| 163 | |
| 164 | |
| 165 | def test_kernel(): |
| 166 | n = 100 |
| 167 | rng = np.random.RandomState(0) |
| 168 | x = rng.randn(n, 2) |
| 169 | |
| 170 | K = ot.utils.kernel(x, x) |
| 171 | |
| 172 | # gaussian kernel has ones on the diagonal |
| 173 | np.testing.assert_allclose(np.diag(K), np.ones(n)) |
| 174 | |
| 175 | |
| 176 | def test_unif(): |