def test_get_input_given_offset_should_return_array_without_offset_first_elems( self): samples = [ Sample(1, None), Sample(2, None), Sample(3, None), Sample(4, None), Sample(5, None) ] sut = Dataset(list(samples)) self.assertListEqual([[2], [3], [4], [5]], sut.get_input(offset=1))
def test_get_input_given_offset_and_num_elems_should_return_chunked_array( self): samples = [ Sample(1, None), Sample(2, None), Sample(3, None), Sample(4, None), Sample(5, None) ] sut = Dataset(list(samples)) self.assertListEqual([[2], [3], [4]], sut.get_input(offset=1, num_elems=3))
def test_get_input_given_axis_samples_false_should_return_array_with_input_as_first_axis( self): samples = [Sample([1, 2], 1), Sample([3, 4], 3)] sut = Dataset(samples) self.assertListEqual([[1, 3], [2, 4]], sut.get_input(axis_samples=False))