| expand_dims_2d | R Documentation |
output_rows x output_cols.Ensures that input is propagated appropriately to a matrix of dimension output_rows x output_cols.
Handles the following cases:
input is a scalar: output is simply a (output_rows, output_cols) matrix with input repeated for each element
input is a vector of length output_rows: output is a (output_rows, output_cols) array with input broadcast across each of output_cols columns
input is a vector of length output_cols: output is a (output_rows, output_cols) array with input broadcast across each of output_rows rows
input is a matrix of dimension (output_rows, output_cols): input is passed through as-is
All other cases throw an error.
expand_dims_2d(input, output_rows, output_cols)
input |
Input to be converted to a matrix (or passed through as-is) |
output_rows |
Intended number of rows in the output array |
output_cols |
Intended number of columns in the output array |
A matrix of dimension output_rows x output_cols
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.