def cofactor(self, i, j, method="berkowitz"):
        if (i + j) % 2 == 0:
            return self.minorEntry(i, j, method)
        else:
            return -1*self.minorEntry(i, j, method)
Calculate the cofactor of an element.
dataset/ETHPy150Open sympy/sympy/sympy/matrices/matrices.py/MatrixBase.cofactor