def test_no_eigenvalues(self): # Module B3 Page 20, Example 2.1 b m = Matrix([[-2, 7], [-1, 3]]) eigenvals = matrix_eigenvalues(m) self.assertIsNone(eigenvals)
def test_real_eigenvalues(self): # Module B3 Page 20, Example 2.1 a m = Matrix([[2, 1], [3, 4]]) eigenvals = matrix_eigenvalues(m) self.assertEqual(eigenvals[0], 1) self.assertEqual(eigenvals[1], 5)