build/modelscript.umd.js
function embed(mat, rows, cols) {
                            var r = mat.rows;
                            var c = mat.columns;
                            if ((r === rows) && (c === cols)) {
                                return mat;
                            } else {
                                var resultat = Matrix.zeros(rows, cols);
                                resultat = resultat.setSubMatrix(mat, 0, 0);
                                return resultat;
                            }
                        }
function embed(mat, rows, cols) {
                            var r = mat.rows;
                            var c = mat.columns;
                            if ((r === rows) && (c === cols)) {
                                return mat;
                            } else {
                                var resultat = Matrix.zeros(rows, cols);
                                resultat = resultat.setSubMatrix(mat, 0, 0);
                                return resultat;
                            }
                        }
function embed ( mat , rows , cols ) { var r = mat . rows ; var c = mat . columns ; if ( ( r === rows ) && ( c === cols ) ) { return mat ; } else { var resultat = Matrix . zeros ( rows , cols ) ; resultat = resultat . setSubMatrix ( mat , 0 , 0 ) ; return resultat ; } }
Put a matrix into the top left of a matrix of zeros. `rows` and `cols` are the dimensions of the output matrix.
Put a matrix into the top left of a matrix of zeros . rows and cols are the dimensions of the output matrix .