コード例 #1
0
 def test_get_output_given_offset_should_return_array_without_offset_first_elems(
         self):
     samples = [
         Sample(1, 1),
         Sample(1, 2),
         Sample(1, 3),
         Sample(1, 4),
         Sample(1, 5)
     ]
     sut = Dataset(list(samples))
     self.assertListEqual([[2], [3], [4], [5]], sut.get_output(offset=1))
コード例 #2
0
 def test_get_output_given_offset_and_num_elems_should_return_chunked_array(
         self):
     samples = [
         Sample(1, 1),
         Sample(1, 2),
         Sample(1, 3),
         Sample(1, 4),
         Sample(1, 5)
     ]
     sut = Dataset(list(samples))
     self.assertListEqual([[2], [3], [4]],
                          sut.get_output(offset=1, num_elems=3))
コード例 #3
0
 def test_get_output_given_axis_samples_false_should_return_array_with_output_as_first_axis(
         self):
     samples = [Sample(1, [1, 2]), Sample(3, [3, 4])]
     sut = Dataset(samples)
     self.assertListEqual([[1, 3], [2, 4]],
                          sut.get_output(axis_samples=False))