ENH: use np.unique for indexing clusters