def METHOD_NAME(ts, axis=-1):
    r"""Compute the perturbation from the mean of a time series.
    Parameters
    ----------
    ts : array-like
         The time series from which you wish to find the perturbation
         time series (perturbation from the mean).
    Returns
    -------
    array-like
        The perturbation time series.
    Other Parameters
    ----------------
    axis : int
           The index of the time axis. Default is -1
    Notes
    -----
    The perturbation time series produced by this function is defined as
    the perturbations about the mean:
    .. math:: x(t)^{\prime} = x(t) - \overline{x(t)}
    """
    mean = ts.mean(axis=axis)[make_take(ts.ndim, axis)(None)]
    return ts - mean