'Calculates the inverse using Gaussian elimination.
See Also
inv
inverse_LU
inverse_ADJ'

def inverse_GE(self, iszerofunc=_iszero):

    from .dense import Matrix
    if (not self.is_square):
        raise NonSquareMatrixError('A    Matrix    must    be    square    to    invert.')
    big = Matrix.hstack(self.as_mutable(), Matrix.eye(self.rows))
    red = big.rref(iszerofunc=iszerofunc, simplify=True)[0]
    if any((iszerofunc(red[(j, j)]) for j in range(red.rows))):
        raise ValueError('Matrix    det    ==    0;    not    invertible.')
    return self._new(red[:, big.rows:])
