MCPcopy
hub / github.com/hyperopt/hyperopt / test_recursive_set_rng_kwarg

Function test_recursive_set_rng_kwarg

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

Source from the content-addressed store, hash-verified

5
6
7def test_recursive_set_rng_kwarg():
8 uniform = scope.uniform
9 a = as_apply([uniform(0, 1), uniform(2, 3)])
10 rng = np.random.default_rng(234)
11 recursive_set_rng_kwarg(a, rng)
12 print(a)
13 val_a = rec_eval(a)
14 assert 0 < val_a[0] < 1
15 assert 2 < val_a[1] < 3
16
17
18def test_lnorm():

Callers

nothing calls this directly

Calls 4

as_applyFunction · 0.90
recursive_set_rng_kwargFunction · 0.90
rec_evalFunction · 0.90
uniformFunction · 0.85

Tested by

no test coverage detected