s!() { /* proc-macro */ }Expand description
NumPy-style slice indexing macro.
Produces a Vec<ferray_core::dtype::SliceInfoElem> that can be passed
to array slicing methods.
§Syntax
s![0..3, 2]— rows 0..3, column 2s![.., 0..;2]— all rows, every-other column starting from 0s![1..5;2, ..]— rows 1..5 step 2, all columnss![3]— single integer indexs![..]— all elements along this axiss![2..]— from index 2 to ends![..5]— from start to index 5s![1..5]— from index 1 to 5s![1..5;2]— from index 1 to 5, step 2
Each component in the comma-separated list becomes one SliceInfoElem.