'Returns a matrix row-equivalent to `self` that is
in echelon form.  Note that echelon form of a matrix
is *not* unique, however, properties like the row
space and the null space are preserved.'

def echelon_form(self, iszerofunc=_iszero, simplify=False, with_pivots=False):

    simpfunc = (simplify if isinstance(simplify, FunctionType) else _simplify)
    (mat, pivots, swaps) = self._eval_echelon_form(iszerofunc, simpfunc)
    if with_pivots:
        return (mat, pivots)
    return mat
