[][src]Macro numas::s

macro_rules! s {
    ($($( $y:expr )=>*);*) => { ... };
}

Returns indices for slicing, each dimension separated with ';' and range with '=>'

Examples

#[macro_use] extern crate numas;

assert_eq!(s![1; 5 => 2; 3], vec![1, 0, 5, 2, 3, 0]);
assert_eq!(s![1; 5; 2; 3], vec![1, 0, 5, 0, 2, 0, 3, 0]);