Skip to content

Commit

Permalink
Add slice_axis_move method
Browse files Browse the repository at this point in the history
  • Loading branch information
jturner314 authored and bluss committed Mar 10, 2024
1 parent 3492a9c commit 20844f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/impl_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br>
/// **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.
///
Expand Down

0 comments on commit 20844f1

Please sign in to comment.