def _iterate_ar_model(input_fields, psi):
    """Iterate autoregressive process."""
    input_field_new = 0.0

    for i, psi_ in enumerate(psi):
        input_field_new += psi_ * input_fields[-(i + 1), :]

    return np.concatenate([input_fields[1:, :], input_field_new[np.newaxis, :]])
Iterate autoregressive process.
pysteps/nowcasts/linda.py