pypen.utils.helpers.step_range()   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 5
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 3
nop 3
1
2
def step_range(start, stop, step):
3
    step = step if step > 0 else 0.1
4
    numelements = int((stop-start)/float(step))
5
    for i in range(numelements+1):
6
        yield start + i*step
7