def linspace(start, stop, n):
    """
    Generates evenly spaced values over an interval

    Parameters
    ----------
    start : int
        Starting value
    stop : int
        End value
    n : int
        Number of values

    Returns
    -------
    list
        Sequence of evenly spaced values
    """
    if n < 0:
        raise ValueError('`n` must be a positive integer.')

    def __generate():
        if n == 1:
            yield stop
            return
        h = (stop - start) / (n - 1)
        for i in range(n):
            yield start + h * i

    return list(__generate())