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 committed Sep 24, 2022
1 parent 6b5e829 commit eb7d92a
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 @@ -655,6 +655,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 eb7d92a

Please sign in to comment.