Ranking of numpy array with possible duplicates,"array([0, 1, 4, 5, 6, 1, 7, 8, 8, 1])"