Example #1
0
 def test_get_shape(self):
     for expected_shape, seq in zip(self.shapes, self.sequences):
         shape_received = get_shape(seq)
         sequence_length = len(flatten(seq))
         self.assertEqual(
             sequence_length,
             prod(shape_received),
             msg=f"array shape {shape_received} is inconsistent")
         self.assertEqual(shape_received, expected_shape)
Example #2
0
 def shape(self):
     return get_shape(self.lines)
Example #3
0
 def shape(self):
     return get_shape(self._data)