Macro arr_rs::array_rand

source ·
macro_rules! array_rand {
    ($([$($nested:expr),*]),* $(,)*) => { ... };
    ($tt:ty, $([$($nested:expr),*]),* $(,)*) => { ... };
    ($tt:ty, $($x:expr),* $(,)*) => { ... };
}
Expand description

Create a rand array

Examples

use arr_rs::prelude::*;

let arr = array_rand!(i32, 8);
assert_eq!(vec![8], arr.get_shape().unwrap());
let arr = array_rand!(i32, 2, 2, 2);
assert_eq!(vec![2, 2, 2], arr.get_shape().unwrap());