'Prepare data for use in the state space representation'

def prepare_data(self):

    endog = np.array(self.data.orig_endog, order='C')
    exog = self.data.orig_exog
    if (exog is not None):
        exog = np.array(exog)
    if (endog.ndim == 1):
        endog.shape = (endog.shape[0], 1)
    return (endog, exog)
