def pivot_index(A, i0):
    """Finds a line of index >= i with the highest coefficient at column i in absolute value"""

    i_max = i0

    for i in range(i0 + 1, len(A)):
        if abs(A[i]) > abs(A[i_max]):
            i_max = i

    return i_max