diff --git a/src/impl_methods.rs b/src/impl_methods.rs index caeed2254..061e9e117 100644 --- a/src/impl_methods.rs +++ b/src/impl_methods.rs @@ -656,6 +656,16 @@ where debug_assert!(self.pointer_is_inbounds()); } + /// Slice the array in place along the specified axis, then return the sliced array. + /// + /// **Panics** if an index is out of bounds or step size is zero.
+ /// **Panics** if `axis` is out of bounds. + #[must_use = "slice_axis_move returns an array with the sliced result"] + pub fn slice_axis_move(mut self, axis: Axis, indices: Slice) -> Self { + self.slice_axis_inplace(axis, indices); + self + } + /// Return a view of a slice of the array, with a closure specifying the /// slice for each axis. ///