MCPcopy
hub / github.com/hyperopt/hyperopt / test_repeatable

Function test_repeatable

hyperopt/pyll/tests/test_stochastic.py:53–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def test_repeatable():
54 u = scope.uniform(0, 1)
55 aa = as_apply(dict(u=u, n=scope.normal(5, 0.1), l=[0, 1, scope.one_of(2, 3), u]))
56 dd1 = sample(aa, np.random.default_rng(3))
57 dd2 = sample(aa, np.random.default_rng(3))
58 dd3 = sample(aa, np.random.default_rng(4))
59 assert dd1 == dd2
60 assert dd1 != dd3
61
62
63def test_sample():

Callers

nothing calls this directly

Calls 2

as_applyFunction · 0.90
sampleFunction · 0.90

Tested by

no test coverage detected