Current behaviour:
julia> using SampledSignals
julia> SampleBuf([1, 2, 3], 1)
3-frame, 1-channel SampleBuf{Int64, 1}
3.0s sampled at 1.0Hz
███
julia> SampleBuf(1:3, 1)
ERROR: MethodError: no method matching SampleBuf(::UnitRange{Int64}, ::Int64)
Closest candidates are:
SampleBuf(::Type, ::Any, ::Quantity) at C:\Users\densb\.julia\packages\SampledSignals\WU1nF\src\SampleBuf.jl:37
SampleBuf(::Type, ::Any, ::Quantity, ::Any) at C:\Users\densb\.julia\packages\SampledSignals\WU1nF\src\SampleBuf.jl:38
SampleBuf(::Type, ::Any, ::Any...) at C:\Users\densb\.julia\packages\SampledSignals\WU1nF\src\SampleBuf.jl:35
...
Stacktrace:
[1] top-level scope
@ REPL[6]:1
This could be fixed by allowing AbstractVector instead of Vector in the constructor. Is there a reason why this has not been done, or should I make a PR?
Current behaviour:
This could be fixed by allowing
AbstractVectorinstead ofVectorin the constructor. Is there a reason why this has not been done, or should I make a PR?