org-arl / SignalAnalysis.jl

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

fix: unsupported kwargs "dims" for sresample #28

Closed ymtoo closed 2 years ago

ymtoo commented 2 years ago

Before:

julia> sresample(signal(randn(10000, 10), 1000), 0.5; dims=1)
ERROR: MethodError: no method matching sresample(::MetaArrays.MetaArray{Matrix{Float64}, SignalAnalysis.SamplingInfo, Float64, 2}, ::Float64; dims=1)
Closest candidates are:
  sresample(::Any, ::Any, ::Any...) at ~/Projects/SignalAnalysis.jl/src/dsp.jl:403 got unsupported keyword argument "dims"
Stacktrace:
 [1] top-level scope
   @ REPL[27]:1

After:

julia> sresample(signal(randn(10000, 10), 1000), 0.5; dims=1)
SampledSignal @ 500.0 Hz, 5000×10 Matrix{Float64}:
  0.0932821   0.62886     …  -0.906615
 -0.0604339   0.531539        0.39423
codecov-commenter commented 2 years ago

Codecov Report

Merging #28 (8938139) into master (bdaffec) will not change coverage. The diff coverage is 100.00%.

:exclamation: Current head 8938139 differs from pull request most recent head 727ce8c. Consider uploading reports for the commit 727ce8c to get more accurate results

@@           Coverage Diff           @@
##           master      #28   +/-   ##
=======================================
  Coverage   73.75%   73.75%           
=======================================
  Files          10       10           
  Lines         621      621           
=======================================
  Hits          458      458           
  Misses        163      163           
Impacted Files Coverage Δ
src/dsp.jl 98.02% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bdaffec...727ce8c. Read the comment docs.