Esempio n. 1
0
def test_set_randomstate_exception(bs_setup):
    bs = IIDBootstrap(bs_setup.x)
    rs = np.array([1, 2, 3, 4])
    with pytest.raises(TypeError, match="Value being set must be a RandomState"):
        bs.random_state = rs
Esempio n. 2
0
def test_set_randomstate(bs_setup):
    bs = IIDBootstrap(bs_setup.x)
    rs = np.random.RandomState([12345])
    bs.random_state = rs
    assert bs.random_state is rs