def _simple_convex_hull(points):
    r"""Compute the convex hull for a set of points.

    .. _wikibooks: https://en.wikibooks.org/wiki/Algorithm_Implementation/\
                   Geometry/Convex_hull/Monotone_chain

    This uses Andrew's monotone chain convex hull algorithm and this code
    used a `wikibooks`_ implementation as motivation. tion. The code there
    is licensed CC BY-SA 3.0.

    .. note::

       There is also a Fortran implementation of this function, which
       will be used if it can be built. Note that ``scipy.spatial.ConvexHull``
       can do this as well (via Qhull), but that would require a hard
       dependency on ``scipy`` and that helper computes much more than we need.

    .. note::

       This computes the convex hull in a "naive" way. It's expected that
       internal callers of this function will have a small number of points
       so ``n log n`` vs. ``n^2`` vs. ``n`` aren't that relevant.

    Args:
        points (numpy.ndarray): A ``2 x N`` array (``float64``) of points.

    Returns:
        numpy.ndarray: The ``2 x N`` array (``float64``) of ordered points in
        the polygonal convex hull.
    """
    # NOTE: There is no corresponding "enable", but the disable only applies
    #       in this lexical scope.
    # pylint: disable=too-many-branches
    if points.size == 0:
        return points

    # First, drop duplicates.
    unique_points = np.unique(points, axis=1)
    _, num_points = unique_points.shape
    if num_points < 2:
        return unique_points

    # Then sort the data in left-to-right order (and break ties by y-value).
    points = np.empty((2, num_points), order="F")
    for index, xy_val in enumerate(
        sorted(tuple(column) for column in unique_points.T)
    ):
        points[:, index] = xy_val
    # After sorting, if there are only 2 points, return.
    if num_points < 3:
        return points

    # Build lower hull
    lower = [0, 1]
    for index in six.moves.xrange(2, num_points):
        point2 = points[:, index]
        while len(lower) >= 2:
            point0 = points[:, lower[-2]]
            point1 = points[:, lower[-1]]
            if cross_product_compare(point0, point1, point2) > 0:
                break

            else:
                lower.pop()
        lower.append(index)
    # Build upper hull
    upper = [num_points - 1]
    for index in six.moves.xrange(num_points - 2, -1, -1):
        # Don't consider indices from the lower hull (other than the ends).
        if index > 0 and in_sorted(lower, index):
            continue

        point2 = points[:, index]
        while len(upper) >= 2:
            point0 = points[:, upper[-2]]
            point1 = points[:, upper[-1]]
            if cross_product_compare(point0, point1, point2) > 0:
                break

            else:
                upper.pop()
        upper.append(index)
    # **Both** corners are double counted.
    size_polygon = len(lower) + len(upper) - 2
    polygon = np.empty((2, size_polygon), order="F")
    for index, column in enumerate(lower[:-1]):
        polygon[:, index] = points[:, column]
    index_start = len(lower) - 1
    for index, column in enumerate(upper[:-1]):
        polygon[:, index + index_start] = points[:, column]
    return polygon
r"""Compute the convex hull for a set of points.

    .. _wikibooks: https://en.wikibooks.org/wiki/Algorithm_Implementation/\
                   Geometry/Convex_hull/Monotone_chain

    This uses Andrew's monotone chain convex hull algorithm and this code
    used a `wikibooks`_ implementation as motivation. tion. The code there
    is licensed CC BY-SA 3.0.

    .. note::

       There is also a Fortran implementation of this function, which
       will be used if it can be built. Note that ``scipy.spatial.ConvexHull``
       can do this as well (via Qhull), but that would require a hard
       dependency on ``scipy`` and that helper computes much more than we need.

    .. note::

       This computes the convex hull in a "naive" way. It's expected that
       internal callers of this function will have a small number of points
       so ``n log n`` vs. ``n^2`` vs. ``n`` aren't that relevant.

    Args:
        points (numpy.ndarray): A ``2 x N`` array (``float64``) of points.

    Returns:
        numpy.ndarray: The ``2 x N`` array (``float64``) of ordered points in
        the polygonal convex hull.