From c8b882d17ad941df27dd94829f4bee129dad292a Mon Sep 17 00:00:00 2001 From: yha Date: Tue, 2 Mar 2021 22:56:56 +0200 Subject: [PATCH] rename local var --- src/utils.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 8c4f8481..a23a47b3 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -94,12 +94,12 @@ function series_segments(series::Series, seriestype::Symbol = :path) (SeriesSegment(r, 1) for r in nan_segments) end - seg_attr_range = UnitRange(minimum(first(seg.range) for seg in result), + seg_range = UnitRange(minimum(first(seg.range) for seg in result), maximum(last(seg.range) for seg in result)) for attr in _segmenting_vector_attributes v = get(series, attr, nothing) - if v isa AVec && eachindex(v) != seg_attr_range - @warn "Indices $(eachindex(v)) of attribute `$attr` does not match data indices $seg_attr_range." + if v isa AVec && eachindex(v) != seg_range + @warn "Indices $(eachindex(v)) of attribute `$attr` does not match data indices $seg_range." if any(v -> !isnothing(v) && any(isnan, v), (x,y,z)) @info """Data contains NaNs or missing values, and indices of `$attr` vector do not match data indices. If you intend elements of `$attr` to apply to individual NaN-separated segements in the data,