def unique(self):
    values = self._values
    if (not isinstance(values, np.ndarray)):
        result: ArrayLike = values.unique()
        if ((self.dtype.kind in ['m', 'M']) and isinstance(self, ABCSeries)):
            if (getattr(self.dtype, 'tz', None) is None):
                result = np.asarray(result)
    else:
        result = unique1d(values)
    return result
def unique(self):
    values = self._values
    if (not isinstance(values, np.ndarray)):
        result: ArrayLike = values.unique()
        if ((self.dtype.kind in ['m', 'M']) and isinstance(self, ABCSeries)):
            if (getattr(self.dtype, 'tz', None) is None):
                result = np.asarray(result)
    else:
        result = unique1d(values)
    return result