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

Function test_dots

test/test_utils.py:306–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304
305
306def test_dots():
307 n1, n2, n3, n4 = 100, 50, 200, 100
308
309 rng = np.random.RandomState(0)
310
311 A = rng.randn(n1, n2)
312 B = rng.randn(n2, n3)
313 C = rng.randn(n3, n4)
314
315 X1 = ot.utils.dots(A, B, C)
316
317 X2 = A.dot(B.dot(C))
318
319 np.testing.assert_allclose(X1, X2)
320
321
322def test_clean_zeros():

Callers

nothing calls this directly

Calls 2

randnMethod · 0.45
dotMethod · 0.45

Tested by

no test coverage detected