macro_rules! array {
($([$([$($x:expr),* $(,)?]),+ $(,)?]),+ $(,)?) => { ... };
($([$($x:expr),* $(,)?]),+ $(,)?) => { ... };
($($x:expr),* $(,)?) => { ... };
}Expand description
Creates array literals, like np.array, supporting one through three dimensions.
use rustnum as np;
assert_eq!(np::array![1,2].shape(),[2]);
assert_eq!(np::array![[1,2],[3,4]].shape(),[2,2]);
assert_eq!(np::array![[[1,2]],[[3,4]]].shape(),[2,1,2]);