def Mat( elems ):
    m, n = len(elems), len(elems[0])
    if m != n: return Matrix(elems)
    if n <= 1: return Square(elems)
    for i in range(1, len(elems)):
        if not iszero( max(map(abs, elems[i][:i])) ):
            break
    else: return UpperTri(elems)
    for i in range(0, len(elems)-1):
        if not iszero( max(map(abs, elems[i][i+1:])) ):
            return Square(elems)
    return LowerTri(elems)
Handler ExceptionTokens
dataset/ETHPy150Open sunlightlabs/clearspending/completeness/statlib/matfunc.py/Mat--crossover with--dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/actorstore/systemactors/net/TCPClient.py/TCPClient.exception_handler