def mean(self, *args, update=None, update_times=None, **kwargs):
    '\n        Calculate an online exponentially weighted mean.\n\n        Parameters\n        ----------\n        update: DataFrame or Series, default None\n            New values to continue calculating the\n            exponentially weighted mean from the last values and weights.\n            Values should be float64 dtype.\n\n            ``update`` needs to be ``None`` the first time the\n            exponentially weighted mean is calculated.\n\n        update_times: Series or 1-D np.ndarray, default None\n            New times to continue calculating the\n            exponentially weighted mean from the last values and weights.\n            If ``None``, values are assumed to be evenly spaced\n            in time.\n            This feature is currently unsupported.\n\n        Returns\n        -------\n        DataFrame or Series\n\n        Examples\n        --------\n        >>> df = pd.DataFrame({"a": range(5), "b": range(5, 10)})\n        >>> online_ewm = df.head(2).ewm(0.5).online()\n        >>> online_ewm.mean()\n              a     b\n        0  0.00  5.00\n        1  0.75  5.75\n        >>> online_ewm.mean(update=df.tail(3))\n                  a         b\n        2  1.615385  6.615385\n        3  2.550000  7.550000\n        4  3.520661  8.520661\n        >>> online_ewm.reset()\n        >>> online_ewm.mean()\n              a     b\n        0  0.00  5.00\n        1  0.75  5.75\n        '
    result_kwargs = {}
    is_frame = (True if (self._selected_obj.ndim == 2) else False)
    if (update_times is not None):
        raise NotImplementedError('update_times is not implemented.')
    else:
        update_deltas = np.ones(max((self._selected_obj.shape[(self.axis - 1)] - 1), 0), dtype=np.float64)
    if (update is not None):
        if (self._mean.last_ewm is None):
            raise ValueError('Must call mean with update=None first before passing update')
        result_from = 1
        result_kwargs['index'] = update.index
        if is_frame:
            last_value = self._mean.last_ewm[np.newaxis, :]
            result_kwargs['columns'] = update.columns
        else:
            last_value = self._mean.last_ewm
            result_kwargs['name'] = update.name
        np_array = np.concatenate((last_value, update.to_numpy()))
    else:
        result_from = 0
        result_kwargs['index'] = self._selected_obj.index
        if is_frame:
            result_kwargs['columns'] = self._selected_obj.columns
        else:
            result_kwargs['name'] = self._selected_obj.name
        np_array = self._selected_obj.astype(np.float64).to_numpy()
    ewma_func = generate_online_numba_ewma_func(self.engine_kwargs)
    result = self._mean.run_ewm((np_array if is_frame else np_array[:, np.newaxis]), update_deltas, self.min_periods, ewma_func)
    if (not is_frame):
        result = result.squeeze()
    result = result[result_from:]
    result = self._selected_obj._constructor(result, **result_kwargs)
    return result
Calculate an online exponentially weighted mean.

Parameters
----------
update: DataFrame or Series, default None
    New values to continue calculating the
    exponentially weighted mean from the last values and weights.
    Values should be float64 dtype.

    ``update`` needs to be ``None`` the first time the
    exponentially weighted mean is calculated.

update_times: Series or 1-D np.ndarray, default None
    New times to continue calculating the
    exponentially weighted mean from the last values and weights.
    If ``None``, values are assumed to be evenly spaced
    in time.
    This feature is currently unsupported.

Returns
-------
DataFrame or Series

Examples
--------
>>> df = pd.DataFrame({"a": range(5), "b": range(5, 10)})
>>> online_ewm = df.head(2).ewm(0.5).online()
>>> online_ewm.mean()
      a     b
0  0.00  5.00
1  0.75  5.75
>>> online_ewm.mean(update=df.tail(3))
          a         b
2  1.615385  6.615385
3  2.550000  7.550000
4  3.520661  8.520661
>>> online_ewm.reset()
>>> online_ewm.mean()
      a     b
0  0.00  5.00
1  0.75  5.75
def mean(self, *args, update=None, update_times=None, **kwargs):
    '\n        Calculate an online exponentially weighted mean.\n\n        Parameters\n        ----------\n        update: DataFrame or Series, default None\n            New values to continue calculating the\n            exponentially weighted mean from the last values and weights.\n            Values should be float64 dtype.\n\n            ``update`` needs to be ``None`` the first time the\n            exponentially weighted mean is calculated.\n\n        update_times: Series or 1-D np.ndarray, default None\n            New times to continue calculating the\n            exponentially weighted mean from the last values and weights.\n            If ``None``, values are assumed to be evenly spaced\n            in time.\n            This feature is currently unsupported.\n\n        Returns\n        -------\n        DataFrame or Series\n\n        Examples\n        --------\n        >>> df = pd.DataFrame({"a": range(5), "b": range(5, 10)})\n        >>> online_ewm = df.head(2).ewm(0.5).online()\n        >>> online_ewm.mean()\n              a     b\n        0  0.00  5.00\n        1  0.75  5.75\n        >>> online_ewm.mean(update=df.tail(3))\n                  a         b\n        2  1.615385  6.615385\n        3  2.550000  7.550000\n        4  3.520661  8.520661\n        >>> online_ewm.reset()\n        >>> online_ewm.mean()\n              a     b\n        0  0.00  5.00\n        1  0.75  5.75\n        '
    result_kwargs = {}
    is_frame = (True if (self._selected_obj.ndim == 2) else False)
    if (update_times is not None):
        raise NotImplementedError('update_times is not implemented.')
    else:
        update_deltas = np.ones(max((self._selected_obj.shape[(self.axis - 1)] - 1), 0), dtype=np.float64)
    if (update is not None):
        if (self._mean.last_ewm is None):
            raise ValueError('Must call mean with update=None first before passing update')
        result_from = 1
        result_kwargs['index'] = update.index
        if is_frame:
            last_value = self._mean.last_ewm[np.newaxis, :]
            result_kwargs['columns'] = update.columns
        else:
            last_value = self._mean.last_ewm
            result_kwargs['name'] = update.name
        np_array = np.concatenate((last_value, update.to_numpy()))
    else:
        result_from = 0
        result_kwargs['index'] = self._selected_obj.index
        if is_frame:
            result_kwargs['columns'] = self._selected_obj.columns
        else:
            result_kwargs['name'] = self._selected_obj.name
        np_array = self._selected_obj.astype(np.float64).to_numpy()
    ewma_func = generate_online_numba_ewma_func(self.engine_kwargs)
    result = self._mean.run_ewm((np_array if is_frame else np_array[:, np.newaxis]), update_deltas, self.min_periods, ewma_func)
    if (not is_frame):
        result = result.squeeze()
    result = result[result_from:]
    result = self._selected_obj._constructor(result, **result_kwargs)
    return result