is unique a function in pure python? There is np.unique but that would turn the thing into a numpy array first...