def test_timeseries_bootstrap():
"""
Tests the timeseries_bootstrap method of BASC workflow
"""
np.random.seed(27)
#np.set_printoptions(threshold=np.nan)
# Create a 10x5 matrix which counts up by column-wise
x = np.arange(50).reshape((5,10)).T
actual= timeseries_bootstrap(x,3)
desired = np.array([[ 4, 14, 24, 34, 44],
[ 5, 15, 25, 35, 45],
[ 6, 16, 26, 36, 46],
[ 8, 18, 28, 38, 48],
[ 9, 19, 29, 39, 49],
[ 0, 10, 20, 30, 40],
[ 7, 17, 27, 37, 47],
[ 8, 18, 28, 38, 48],
[ 9, 19, 29, 39, 49],
[ 8, 18, 28, 38, 48]])
np.testing.assert_equal(actual, desired)
评论列表
文章目录