pub fn partition<T>(
a: &Array<T, Ix1>,
kth: usize,
) -> FerrayResult<Array<T, Ix1>>Expand description
Partial sort: rearrange elements so that a[kth] is the value that
would be there in a sorted array, all elements before it are <=,
and all elements after are >=. The relative order within the two
halves is undefined.
Equivalent to numpy.partition(a, kth). Uses select_nth_unstable
for O(n) average-case performance (#466).
ยงErrors
FerrayError::AxisOutOfBoundsifkth >= a.size().