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

Function test_OTResult_LazyTensor

test/test_utils.py:539–545  ·  view source on GitHub ↗
(nx)

Source from the content-addressed store, hash-verified

537
538
539def test_OTResult_LazyTensor(nx):
540 T, a, b = get_LazyTensor(nx)
541
542 res = ot.utils.OTResult(lazy_plan=T, batch_size=9, backend=nx)
543
544 np.testing.assert_allclose(nx.to_numpy(a), nx.to_numpy(res.marginal_a))
545 np.testing.assert_allclose(nx.to_numpy(b), nx.to_numpy(res.marginal_b))
546
547
548def test_LazyTensor_reduce(nx):

Callers

nothing calls this directly

Calls 2

get_LazyTensorFunction · 0.85
to_numpyMethod · 0.80

Tested by

no test coverage detected