ndarray-stats icon indicating copy to clipboard operation
ndarray-stats copied to clipboard

Change get_from_sorted_mut signature to be analogous to select_nth_unstable

Open jturner314 opened this issue 4 years ago • 0 comments

Rust 1.49 adds a select_nth_unstable method to slices which is very similar to get_from_sorted_mut, except that it returns a mutable reference to the element and additionally returns slices for the portions before/after the element. It would probably be worthwhile to change the API of get_from_sorted_mut to match (and maybe rename it):

pub fn select_nth_unstable(&mut self, i: usize) -> (ArrayViewMut1<'_, A>, &mut A, ArrayViewMut1<'_, A>)
where
    A: Ord,
    S: DataMut,

jturner314 avatar Jan 02 '21 01:01 jturner314