def _versiontuple(v):
    """
    Converts a version string to a tuple.

    Parameters
    ----------
    v : :obj:`str`
        Version number as a string. For example: '1.1.1'

    Returns
    -------
    tuple
        Three element tuple with the version number. For example: (1, 1, 1)

    """

    return tuple(map(int, (v.split("."))))