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)
def shape(self): return get_shape(self.lines)
def shape(self): return get_shape(self._data)