def _calculate_deltas(times: (((str | np.ndarray) | NDFrame) | None), halflife: ((float | TimedeltaConvertibleTypes) | None)) -> np.ndarray:
    '\n    Return the diff of the times divided by the half-life. These values are used in\n    the calculation of the ewm mean.\n\n    Parameters\n    ----------\n    times : str, np.ndarray, Series, default None\n        Times corresponding to the observations. Must be monotonically increasing\n        and ``datetime64[ns]`` dtype.\n    halflife : float, str, timedelta, optional\n        Half-life specifying the decay\n\n    Returns\n    -------\n    np.ndarray\n        Diff of the times divided by the half-life\n    '
    _times = np.asarray(times.view(np.int64), dtype=np.float64)
    _halflife = float(Timedelta(halflife).value)
    return (np.diff(_times) / _halflife)
Return the diff of the times divided by the half-life. These values are used in
the calculation of the ewm mean.

Parameters
----------
times : str, np.ndarray, Series, default None
    Times corresponding to the observations. Must be monotonically increasing
    and ``datetime64[ns]`` dtype.
halflife : float, str, timedelta, optional
    Half-life specifying the decay

Returns
-------
np.ndarray
    Diff of the times divided by the half-life
def _calculate_deltas(times: (((str | np.ndarray) | NDFrame) | None), halflife: ((float | TimedeltaConvertibleTypes) | None)) -> np.ndarray:
    '\n    Return the diff of the times divided by the half-life. These values are used in\n    the calculation of the ewm mean.\n\n    Parameters\n    ----------\n    times : str, np.ndarray, Series, default None\n        Times corresponding to the observations. Must be monotonically increasing\n        and ``datetime64[ns]`` dtype.\n    halflife : float, str, timedelta, optional\n        Half-life specifying the decay\n\n    Returns\n    -------\n    np.ndarray\n        Diff of the times divided by the half-life\n    '
    _times = np.asarray(times.view(np.int64), dtype=np.float64)
    _halflife = float(Timedelta(halflife).value)
    return (np.diff(_times) / _halflife)