Shortest distance for points in a plane
Just reviewing brute_force.


There's no docstring.
There's no need to write comments if they just repeat what it says in the code:

sep = float('inf')  # set the initial minimum to infinity


Use comments to explain things that are hard to deduce from reading the code.
The special case for n &lt; 2 is unnecessary. If n is less than 2, then the loop over i will be empty and no pairs will be tested.
There are some superfluous parentheses. In Python the comma operator has higher precedence than assignment, and so, instead of:

pair = (xpoints[i], xpoints[j])


you can write:

pair = xpoints[i], xpoints[j]

The expression abs(xpoints[i] - xpoints[j]) gets computed twice in some cases: this could be avoided by storing the result in a local variable.
When looping over the distinct pairs of a sequence, use itertools.combinations, like this:

from itertools import combinations

def brute_force(points):
    """Find the pair (p, q) in the sequence points with the closest
    separation. Return the tuple (separation, (p, q)).

    """
    sep = float('inf')
    pair = None, None
    for p, q in combinations(points, 2):
        pq_sep = abs(p - q)
        if pq_sep &lt; sep:
            sep = pq_sep
            pair = p, q
    return sep, pair

This could be turned into a single expression using min and operator.itemgetter:

from itertools import combinations
from operator import itemgetter

def brute_force(points):
    """Find the pair (p, q) in the sequence points with the closest
    separation. Return the tuple (separation, (p, q)).

    """
    return min(((abs(p - q), (p, q)) for p, q in combinations(points, 2)),
               key=itemgetter(0), default=(float('inf'), (None, None)))


(This needs to be Python 3.4 or later since it uses the default keyword argument.)

Not everyone finds this style of programming readable, so it would be totally reasonable to stop with the version in §6 above and not try to squash everything into a single expression.