Merge pull request #1636 from oschulz/fixes-julia-v1.0
More fixes for Julia v1.0
This commit is contained in:
commit
5c21261aea
@ -498,21 +498,25 @@ function _stepbins_path(edge, weights, baseline::Real, xscale::Symbol, yscale::S
|
|||||||
log_scale_x = xscale in _logScales
|
log_scale_x = xscale in _logScales
|
||||||
log_scale_y = yscale in _logScales
|
log_scale_y = yscale in _logScales
|
||||||
|
|
||||||
nbins = length(linearindices(weights))
|
nbins = length(eachindex(weights))
|
||||||
if length(linearindices(edge)) != nbins + 1
|
if length(eachindex(edge)) != nbins + 1
|
||||||
error("Edge vector must be 1 longer than weight vector")
|
error("Edge vector must be 1 longer than weight vector")
|
||||||
end
|
end
|
||||||
|
|
||||||
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