src/dieboldmariano/dieboldmariano.py
def autocovariance(X: Sequence[float], k: int, mean: float) -> float:
    """
    Returns the k-lagged autocovariance for the input iterable.
    """
    return sum((a - mean) * (b - mean) for a, b in zip(islice(X, k, None), X)) / len(X)

    Returns the k-lagged autocovariance for the input iterable.
    
Returns the k-lagged autocovariance for the input iterable.
Returns the k - lagged autocovariance for the input iterable .
def autocovariance(X: Sequence[float], k: int, mean: float) -> float:
    return sum((a - mean) * (b - mean) for a, b in zip(islice(X, k, None), X)) / len(X)
def autocovariance ( X : Sequence [ float ] , k : int , mean : float ) -> float : return sum ( ( a - mean ) * ( b - mean ) for a , b in zip ( islice ( X , k , None ) , X ) ) / len ( X )
Returns the k-lagged autocovariance for the input iterable.
Returns the k - lagged autocovariance for the input iterable .
"""
    Returns the k-lagged autocovariance for the input iterable.
    """
X
Sequence[float]
k
int
mean
float