def numseries_segment(wsize, iterable):
    """
    >>> list(numseries_segment(5, [1, 3, 5, 7]))
    [[1, 3], [5, 7]]

    :param wsize: integer
    :param iterable: must be asc ordered
    :return: a list of lists
    """
    wsize = float(wsize)
    count = 0
    chunk = list()
    for num in iterable:
        idx = int(num / wsize)
        while idx > count:
            yield chunk
            chunk = list()
            count += 1
        chunk.append(num)
    yield chunk
