Matrix.reshapeFromList constructor
Implementation
Matrix.reshapeFromList(List<double> data,
{required this.n, required this.m}) {
if (data.length == n * m) {
_base = List<List<double>>.generate(
n, (index) => data.sublist(m * index, m * (index + 1)));
} else {
throw Exception('Dimension error: ${data.length} != $n*$m');
}
}