<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _append_to_endog(endog, new_y):
 """Append to the endogenous array Parameters endog : np.ndarray, shape=(n_samples, [1]) The existing endogenous array new_y : np.ndarray, shape=(n_samples) The new endogenous array to append """

    return np.concatenate((endog, new_y)) if \
        endog.ndim == 1 else \
        np.concatenate((endog.ravel(), new_y))[:, np.newaxis]