def test_cofactor_of_3x3(self): a = Matrix([[3, 5, 0], [2, -1, -7], [6, -1, 5]]) assert a.minor(0, 0) == -12 assert a.cofactor(0, 0) == -12 assert a.minor(1, 0) == 25 assert a.cofactor(1, 0) == -25
def test_minor_of_3x3(self): a = Matrix([[3, 5, 0], [2, -1, -7], [6, -1, 5]]) b = a.submatrix(1, 0) assert b.determinant() == 25 assert a.minor(1, 0) == 25