From d4406bb80617fb074a93f6dcf0b54d168449414d Mon Sep 17 00:00:00 2001 From: Oliver Schulz Date: Sat, 11 Aug 2018 13:21:06 +0100 Subject: [PATCH] Use length(eachindex(...)) instead of length(linearindices(...)) --- src/recipes.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index b8bc4abe..0f1bbf33 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -498,8 +498,8 @@ function _stepbins_path(edge, weights, baseline::Real, xscale::Symbol, yscale::S log_scale_x = xscale in _logScales log_scale_y = yscale in _logScales - nbins = length(linearindices(weights)) - if length(linearindices(edge)) != nbins + 1 + nbins = length(eachindex(weights)) + if length(eachindex(edge)) != nbins + 1 error("Edge vector must be 1 longer than weight vector") end