ndarray icon indicating copy to clipboard operation
ndarray copied to clipboard

Add multislice_axis! macro

Open jturner314 opened this issue 6 years ago • 1 comments

The next release of ndarray will have a multislice! macro for easily taking multiple mutable, disjoint slices simultaneously. (#388) This is great, but there are cases where you want to slice only a single axis given that axis number (analogous to slice_axis versus slice) for an array with an arbitrary dimension type. It would be useful to provide a multislice_axis! macro that can be called like this:

let (a, b, c, d, e) = multislice_axis!(arr, Axis(2), 0..5, mut 6..;2, 1..6, mut 7..;2, 3);

jturner314 avatar Mar 09 '19 21:03 jturner314

Hello! Is this issue still active? The multislice macro that is being compared was removed in #719.

bokutotu avatar Jan 03 '22 18:01 bokutotu