felixcremer / EmpiricalModeDecomposition.jl

Implementation of the Empirical Mode Decomposition in Julia
Other
16 stars 2 forks source link

emd return type #17

Closed henry2004y closed 3 years ago

henry2004y commented 3 years ago

It is not so nice to see the emd function returning types of e.g. 2-element Vector{Any}. I propose to modify it like:

function emd(measurements::Vector{T}, xvec, num_imfs=6) where T<:AbstractFloat
    collect(Vector{T}, take(EMDIterable(measurements, xvec), num_imfs))
end

such that it will then return concrete types like 2-element Vector{Vector{Float64}}.

A PR for this is coming up.