Skip to content

__nth_element__

builtin · libnexusinterp/corefcn/data-proprietary.cc

: y = __nth_element__ (x, n)
: y = __nth_element__ (x, n, dim)

Select the n-th smallest element along a dimension, without a complete sort. n is a positive integer or a contiguous range of them (in increasing or decreasing order).