'Convenience function to create ArmaProcess from ARMA representation
Parameters
arcoefs : array-like, optional
Coefficient for autoregressive lag polynomial, not including zero
lag. The sign is inverted to conform to the usual time series
representation of an ARMA process in statistics. See the class
docstring for more information.
macoefs : array-like, optional
Coefficient for moving-average lag polynomial, excluding zero lag
nobs : int, optional
Length of simulated time series. Used, for example, if a sample
is generated.
Examples
>>> arparams = [.75, -.25]
>>> maparams = [.65, .35]
>>> arma_process = sm.tsa.ArmaProcess.from_coeffs(ar, ma)
>>> arma_process.isstationary
True
>>> arma_process.isinvertible
True'

@classmethod
def from_coeffs(cls, arcoefs=None, macoefs=None, nobs=100):

    arcoefs = ([] if (arcoefs is None) else arcoefs)
    macoefs = ([] if (macoefs is None) else macoefs)
    return cls(np.r_[(1, (- np.asarray(arcoefs)))], np.r_[(1, np.asarray(macoefs))], nobs=nobs)
