def is_stable(coefs, verbose=False):
 A_var1 = util.comp_matrix(coefs)
 eigs = np.linalg.eigvals(A_var1)
 if verbose:
  print('Eigenvalues of VAR(1) rep')
  for val in np.abs(eigs):
   print(val)
 return (np.abs(eigs) <= 1).all()

def is_stable ( coefs , verbose = False ) : A_var1 = util . comp_matrix ( coefs ) eigs = np . linalg . eigvals ( A_var1 ) if verbose : print ( 'Eigenvalues of VAR(1) rep' ) for val in np . abs ( eigs ) : print ( val ) return ( np . abs ( eigs ) <= 1 ) . all ( )
determine stability of var(p) system by examining the eigenvalues of the var(1) representation parameters coefs : ndarray returns is_stable : bool .