def frange(start, stop, step):
    """Range function for float values."""
    if step == 0:
        return [start]

    if isinstance(step, int):
        return range(start, stop, step)

    v = start
    vs = []
    while v < stop:
        vs.append(v)
        v += step
    return vs