Initializes a new matrix.
// Defines a 3x3 matrix [[1, 2, 3], [4, 5, 6], [7, 8, 9]]let A = Chalkboard.matr.init([1, 2, 3], [4, 5, 6], [7, 8, 9]);let B = Chalkboard.matr.init([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); Copy
// Defines a 3x3 matrix [[1, 2, 3], [4, 5, 6], [7, 8, 9]]let A = Chalkboard.matr.init([1, 2, 3], [4, 5, 6], [7, 8, 9]);let B = Chalkboard.matr.init([[1, 2, 3], [4, 5, 6], [7, 8, 9]]);
Either a sequence of 1D arrays to be used as rows for the matrix or one 2D array to be used as the matrix
Initializes a new matrix.
Example