the definition of eig in prepare55 doesn't allow complex eigenvalue formatting. Proposed solution: if not isinstance(eig, (float, complex) and eig != None: Same approach for modal_a and modal_b