Fix _stepbins_path (new Julia v0.7/v1.0 iteration API)
This commit is contained in:
parent
d4406bb806
commit
1fda0df03e
@ -506,13 +506,17 @@ function _stepbins_path(edge, weights, baseline::Real, xscale::Symbol, yscale::S
|
|||||||
x = eltype(edge)[]
|
x = eltype(edge)[]
|
||||||
y = eltype(weights)[]
|
y = eltype(weights)[]
|
||||||
|
|
||||||
it_e, it_w = start(edge), start(weights)
|
it_tuple_e = iterate(edge)
|
||||||
a, it_e = next(edge, it_e)
|
a, it_state_e = it_tuple_e
|
||||||
|
it_tuple_e = iterate(edge, it_state_e)
|
||||||
|
|
||||||
|
it_tuple_w = iterate(weights)
|
||||||
|
|
||||||
last_w = eltype(weights)(NaN)
|
last_w = eltype(weights)(NaN)
|
||||||
i = 1
|
|
||||||
while (!done(edge, it_e) && !done(edge, it_e))
|
while it_tuple_e != nothing && it_tuple_w != nothing
|
||||||
b, it_e = next(edge, it_e)
|
b, it_state_e = it_tuple_e
|
||||||
w, it_w = next(weights, it_w)
|
w, it_state_w = it_tuple_w
|
||||||
|
|
||||||
if (log_scale_x && a ≈ 0)
|
if (log_scale_x && a ≈ 0)
|
||||||
a = b/_logScaleBases[xscale]^3
|
a = b/_logScaleBases[xscale]^3
|
||||||
@ -536,6 +540,9 @@ function _stepbins_path(edge, weights, baseline::Real, xscale::Symbol, yscale::S
|
|||||||
|
|
||||||
a = b
|
a = b
|
||||||
last_w = w
|
last_w = w
|
||||||
|
|
||||||
|
it_tuple_e = iterate(edge, it_state_e)
|
||||||
|
it_tuple_w = iterate(weights, it_state_w)
|
||||||
end
|
end
|
||||||
if (last_w != baseline)
|
if (last_w != baseline)
|
||||||
push!(x, a)
|
push!(x, a)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user