You could also do `kpts_recarray.sort(index=...)[:n_keypoints]`