def _pivot_col(tableau, skip_aux, piv_options):
    """
    Choose the column containing the pivot element: the column
    containing the maximum positive element in the last row of the
    tableau.

    `skip_aux` should be True in phase 1, and False in phase 2.

    Parameters
    ----------
    tableau : ndarray(float, ndim=2)
        ndarray of shape (L+1, n+m+L+1) containing the tableau.

    skip_aux : bool
        Whether to skip the coefficients of the auxiliary (or
        artificial) variables in pivot column selection.

    piv_options : PivOptions, optional
        PivOptions namedtuple to set the tolerance values.

    Returns
    -------
    found : bool
        True iff there is a positive element in the last row of the
        tableau (and then pivoting should be conducted).

    pivcol : int
        The index of column containing the pivot element. (-1 if `found
        == False`.)

    """
    L = tableau.shape[0] - 1
    criterion_row_stop = tableau.shape[1] - 1
    if skip_aux:
        criterion_row_stop -= L

    found = False
    pivcol = -1
    coeff = piv_options.fea_tol
    for j in range(criterion_row_stop):
        if tableau[-1, j] > coeff:
            coeff = tableau[-1, j]
            pivcol = j
            found = True

    return found, pivcol