def test_numpy_slices_sequential_sampler():
    logger.info('Test numpy_slices_dataset with SequentialSampler and repeat.')
    np_data = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]
    ds = de.NumpySlicesDataset(np_data, sampler=de.SequentialSampler()).repeat(2)
    for (i, data) in enumerate(ds):
        assert np.equal(data[0], np_data[(i % 8)]).all()
def test_numpy_slices_sequential_sampler():
    logger.info('Test numpy_slices_dataset with SequentialSampler and repeat.')
    np_data = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]
    ds = de.NumpySlicesDataset(np_data, sampler=de.SequentialSampler()).repeat(2)
    for (i, data) in enumerate(ds):
        assert np.equal(data[0], np_data[(i % 8)]).all()