Function rand_single_input

Source
pub fn rand_single_input(n: Dynamic) -> Result<Array, Box<EvalAltResult>>
Expand description

Returns a matrix of random values, each between zero and one. Can be called with a single integer argument (indicating the square matrix of that size) or with an array argument (indicating the size for each dimension).

let matrix = rand(3);
assert_eq(size(matrix), [3, 3]);
let matrix = rand([3, 3]);
assert_eq(size(matrix), [3, 3]);