def test_bootstrap_units():
 data = rs.randn(50)
 ids = np.repeat(range(10), 5)
 bwerr = rs.normal(0, 2, 10)
 bwerr = bwerr[ids]
 data_rm = (data + bwerr)
 seed = 77
 boots_orig = algo.bootstrap(data_rm, random_seed=seed)
 boots_rm = algo.bootstrap(data_rm, units=ids, random_seed=seed)
 nose.tools.assert_greater(boots_rm.std(), boots_orig.std())

def test_bootstrap_units ( ) : data = rs . randn ( 50 ) ids = np . repeat ( range ( 10 ) , 5 ) bwerr = rs . normal ( 0 , 2 , 10 ) bwerr = bwerr [ ids ] data_rm = ( data + bwerr ) seed = 77 boots_orig = algo . bootstrap ( data_rm , random_seed = seed ) boots_rm = algo . bootstrap ( data_rm , units = ids , random_seed = seed ) nose . tools . assert_greater ( boots_rm . std ( ) , boots_orig . std ( ) )
test that results make sense when passing unit ids to bootstrap .