def __array__(self, dtype=None):
    '\n        The numpy array interface.\n\n        Returns\n        -------\n        values : numpy array\n            A numpy array of either the specified dtype or,\n            if dtype==None (default), the same dtype as\n            categorical.categories.dtype\n        '
    ret = take_1d(self.categories.values, self._codes)
    if (dtype and (not is_dtype_equal(dtype, self.categories.dtype))):
        return np.asarray(ret, dtype)
    if is_extension_array_dtype(ret):
        ret = np.asarray(ret)
    return ret
The numpy array interface.

Returns
-------
values : numpy array
    A numpy array of either the specified dtype or,
    if dtype==None (default), the same dtype as
    categorical.categories.dtype
def __array__(self, dtype=None):
    '\n        The numpy array interface.\n\n        Returns\n        -------\n        values : numpy array\n            A numpy array of either the specified dtype or,\n            if dtype==None (default), the same dtype as\n            categorical.categories.dtype\n        '
    ret = take_1d(self.categories.values, self._codes)
    if (dtype and (not is_dtype_equal(dtype, self.categories.dtype))):
        return np.asarray(ret, dtype)
    if is_extension_array_dtype(ret):
        ret = np.asarray(ret)
    return ret