def drange(start, stop, step=1.0, include_stop=False):
    """
    Generate between 2 numbers w/ optional step, optionally include upper bound
    """
    if step == 0:
        step = 0.01
    r = start

    if include_stop:
        while r <= stop:
            yield r
            r += step
            r = round(r, 10)
    else:
        while r < stop:
            yield r
            r += step
            r = round(r, 10)
def drange ( start , stop , step = 1.0 , include_stop = False ) : if step == 0 : step = 0.01 r = start if include_stop : while r <= stop : yield r r += step r = round ( r , 10 ) else : while r < stop : yield r r += step r = round ( r , 10 )
Generate between 2 numbers w/ optional step, optionally include upper bound