Array constructor
Implementation
Array({required this.values, Tuple2<int, int>? shape}) {
shape ??=
Tuple2(values.length, values.isNotEmpty ? values.first.length : 0);
// assert the values list has the correct shape
assert(values.every((line) => line.length == shape!.item2));
this.shape = shape;
}