@final
def _ea_wrap_cython_operation(self, values: ExtensionArray, min_count: int, ngroups: int, comp_ids: np.ndarray, **kwargs) -> ArrayLike:
    '\n        If we have an ExtensionArray, unwrap, call _cython_operation, and\n        re-wrap if appropriate.\n        '
    if (isinstance(values, BaseMaskedArray) and self.uses_mask()):
        return self._masked_ea_wrap_cython_operation(values, min_count=min_count, ngroups=ngroups, comp_ids=comp_ids, **kwargs)
    if isinstance(values, (DatetimeArray, PeriodArray, TimedeltaArray)):
        npvalues = values._ndarray.view('M8[ns]')
    elif isinstance(values.dtype, (BooleanDtype, _IntegerDtype)):
        npvalues = values.to_numpy('float64', na_value=np.nan)
    elif isinstance(values.dtype, FloatingDtype):
        npvalues = values.to_numpy(values.dtype.numpy_dtype, na_value=np.nan)
    elif isinstance(values.dtype, StringDtype):
        npvalues = values.to_numpy(object, na_value=np.nan)
    else:
        raise NotImplementedError(f'function is not implemented for this dtype: {values.dtype}')
    res_values = self._cython_op_ndim_compat(npvalues, min_count=min_count, ngroups=ngroups, comp_ids=comp_ids, mask=None, **kwargs)
    if (self.how in ['rank']):
        return res_values
    return self._reconstruct_ea_result(values, res_values)
If we have an ExtensionArray, unwrap, call _cython_operation, and
re-wrap if appropriate.
@final
def _ea_wrap_cython_operation(self, values: ExtensionArray, min_count: int, ngroups: int, comp_ids: np.ndarray, **kwargs) -> ArrayLike:
    '\n        If we have an ExtensionArray, unwrap, call _cython_operation, and\n        re-wrap if appropriate.\n        '
    if (isinstance(values, BaseMaskedArray) and self.uses_mask()):
        return self._masked_ea_wrap_cython_operation(values, min_count=min_count, ngroups=ngroups, comp_ids=comp_ids, **kwargs)
    if isinstance(values, (DatetimeArray, PeriodArray, TimedeltaArray)):
        npvalues = values._ndarray.view('M8[ns]')
    elif isinstance(values.dtype, (BooleanDtype, _IntegerDtype)):
        npvalues = values.to_numpy('float64', na_value=np.nan)
    elif isinstance(values.dtype, FloatingDtype):
        npvalues = values.to_numpy(values.dtype.numpy_dtype, na_value=np.nan)
    elif isinstance(values.dtype, StringDtype):
        npvalues = values.to_numpy(object, na_value=np.nan)
    else:
        raise NotImplementedError(f'function is not implemented for this dtype: {values.dtype}')
    res_values = self._cython_op_ndim_compat(npvalues, min_count=min_count, ngroups=ngroups, comp_ids=comp_ids, mask=None, **kwargs)
    if (self.how in ['rank']):
        return res_values
    return self._reconstruct_ea_result(values, res_values)