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

Function test_get_random_projections

test/test_sliced.py:16–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def test_get_random_projections():
17 rng = np.random.RandomState(0)
18 projections = get_random_projections(1000, 50, rng)
19 np.testing.assert_almost_equal(np.sum(projections**2, 0), 1.0)
20
21
22def test_sliced_same_dist():

Callers

nothing calls this directly

Calls 2

get_random_projectionsFunction · 0.90
sumMethod · 0.45

Tested by

no test coverage detected