lisa.utils.value_range#
- lisa.utils.value_range(start, stop, step=None, nr_steps=None, inclusive=False, type_=None, clip=False)[source]#
Equivalent to builtin
rangefunction, but works for floats as well.- Parameters:
start (numbers.Number) – First value to use.
stop (numbers.Number) – Last value to use.
step (numbers.Number) – Mutually exclusive with
nr_steps: increment. IfNone, increment defaults to 1.nr_steps (int or None) – Mutually exclusive with
step: number of steps.inclusive (bool) – If
True, thestopvalue will be included (unlike the builtinrange)type (collections.abc.Callable) – If specified, will be mapped on the resulting values.
clip (bool) – If
True, the last value is set tostop, rather than potentially be different ifinclusive=True.
Note
Unlike
range, it will raiseValueErrorifstart > stop and step > 0.