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

Function test_get_coordinate_circle

test/test_utils.py:489–496  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

487
488
489def test_get_coordinate_circle():
490 rng = np.random.RandomState(42)
491 u = rng.rand(1, 100)
492 x1, y1 = np.cos(u * (2 * np.pi)), np.sin(u * (2 * np.pi))
493 x = np.concatenate([x1, y1]).T
494 x_p = ot.utils.get_coordinate_circle(x)
495
496 np.testing.assert_allclose(u[0], x_p)
497
498
499def test_LazyTensor(nx):

Callers

nothing calls this directly

Calls 2

randMethod · 0.45
concatenateMethod · 0.45

Tested by

no test coverage detected