Beispiel #1
0
def test_loguniform_int():
    x = LogUniform(1, 2, intify=True)
    seeds = np.random.random((1000, 1))
    draws = [x.draw(s) for s in seeds]
    print draws
    assert all(i in (1, 2) for i in draws)
Beispiel #2
0
def test_loguniform():
    x = LogUniform(1, 2)
    seeds = np.random.random((10, 1))
    draws = [x.draw(s) for s in seeds]
    print draws
    assert all(1 <= i < 2 for i in draws)