

def cumsum_n(x, n):
    if n:
        n -= 1
        x = np.cumsum(x)
        return cumsum_n(x, n)
    else:
        return x

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/arima_model.py cumsum_n/original