code: def inverse(self):
          
          inv = np.empty(self.size, np.int)
          inv[self.sorter] = self.sorted_group_rank_per_key
          return inv
docs: return index array that maps unique values back to original space. unique[inverse]==keys