def istriu(am):
    r"""
    Returns ``True`` is the sparse adjacency matrix is upper triangular
    """
    if am.shape[0] != am.shape[1]:
        print('Matrix is not square, triangularity is irrelevant')
        return False
    if am.format != 'coo':
        am = am.tocoo(copy=False)
    return sp.all(am.row <= am.col)
r"""
    Returns ``True`` is the sparse adjacency matrix is upper triangular