ndarray.partition(kth, axis=-1, kind='introselect', order=None)
Rearranges the elements in the array in such a way that value of the element in kth position is in the position it would be in a sorted array. All elements smaller than the kth element are moved before this element and all equal or greater are moved behind it. The ordering of the elements in the two partitions is undefined. New in version 1.8.0. Parameters:
kth : int or sequence of ints Element index to partition by. The kt