def constrain_stationary_univariate(unconstrained):

    n = unconstrained.shape[0]
    y = np.zeros((n, n), dtype=unconstrained.dtype)
    r = unconstrained/((1 + unconstrained**2)**0.5)
    for k in range(n):
        for i in range(k):
            y[k, i] = y[k - 1, i] + r[k] * y[k - 1, k - i - 1]
        y[k, k] = r[k]
    return -y[n - 1, :]
Verify and normalize path.
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/statespace/tools.py/constrain_stationary_univariate--crossover with--dataset/ETHPy150Open syrusakbary/Flask-SuperAdmin/flask_superadmin/contrib/fileadmin.py/FileAdmin._normalize_path