atLeast2D function
Matrix
atLeast2D(
- dynamic array
Implementation
Matrix atLeast2D(final array) {
if (array is List<Vector>) {
return Matrix.fromColumns(array);
} else if (array is num) {
return Matrix.column([array as double]);
} else if (array is Vector) {
return Matrix.fromColumns([array]);
}
assert(array is Matrix);
return array;
}