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

Function test_solve_sample_NotImplemented

test/test_solvers.py:696–710  ·  view source on GitHub ↗
(nx, method_params)

Source from the content-addressed store, hash-verified

694
695@pytest.mark.parametrize("method_params", lst_parameters_solve_sample_NotImplemented)
696def test_solve_sample_NotImplemented(nx, method_params):
697 n_samples_s = 20
698 n_samples_t = 7
699 n_features = 2
700 rng = np.random.RandomState(0)
701
702 x = rng.randn(n_samples_s, n_features)
703 y = rng.randn(n_samples_t, n_features)
704 a = ot.utils.unif(n_samples_s)
705 b = ot.utils.unif(n_samples_t)
706
707 xb, yb, ab, bb = nx.from_numpy(x, y, a, b)
708
709 with pytest.raises(NotImplementedError):
710 ot.solve_sample(xb, yb, ab, bb, **method_params)

Callers

nothing calls this directly

Calls 2

from_numpyMethod · 0.80
randnMethod · 0.45

Tested by

no test coverage detected