SciPy

numpy.ma.masked_array.partition

masked_array.partition(kth, axis=-1, kind='introselect', order=None)[source]