org-arl / SignalAnalysis.jl

Signal analysis toolbox for Julia
MIT License
41 stars 10 forks source link

array indexing bug in plot(::SampleBuf) #5

Closed baggepinnen closed 4 years ago

baggepinnen commented 4 years ago

Only occurs for signals of certain lengths Reproducer:

y = randn(61040, 2)
plot(signal(y, fs), lab=["Signal" "Fitlered"])
BoundsError: attempt to access 8720-element StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}} at index [1:9390]
throw_boundserror(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Tuple{UnitRange{Int64}}) at abstractarray.jl:537
checkbounds at abstractarray.jl:502 [inlined]
getindex(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::UnitRange{Int64}) at twiceprecision.jl:463
mchitre commented 4 years ago

Fixed