def acf_to_acorr(acf):
    diag = np.diag(acf[0])
    # numpy broadcasting sufficient
    return acf / np.sqrt(np.outer(diag, diag))
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/vector_ar/util.py/acf_to_acorr/original