MCPcopy Create free account
hub / github.com/PythonOT/POT / test_kernel

Function test_kernel

test/test_utils.py:165–173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163
164
165def 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
176def test_unif():

Callers

nothing calls this directly

Calls 3

randnMethod · 0.45
diagMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected