RF: refactor data sorting with np.lexsort

Try to simplify data sorting using np.lexsort and reshape `order`
keyword.