def is_invertible(polynomial, threshold=1.0):
 eigvals = np.linalg.eigvals(companion_matrix(polynomial))
 return np.all((np.abs(eigvals) < threshold))

def is_invertible ( polynomial , threshold = 1.0 ) : eigvals = np . linalg . eigvals ( companion_matrix ( polynomial ) ) return np . all ( ( np . abs ( eigvals ) < threshold ) )
determine if a polynomial is invertible .