invenia / Impute.jl

Imputation methods for missing data in julia
https://invenia.github.io/Impute.jl/latest/
Other
77 stars 11 forks source link

Allow dims arg to Filter `apply` when there are no missings #112

Closed bencottier closed 3 years ago

bencottier commented 3 years ago

Use cases for Filter may be agnostic to whether the data allows missing values, and therefore they will pass the dims kwarg.

For example:

using Impute

function my_apply(data::AbstractArray, f::Filter; dims)
    # data may or may not allow/have missing values
    Impute.apply(data, f; dims=dims)
end

If data does not allow missing, the apply will dispatch to the table method and throw a MethodError.

To get the appropriate method, we therefore need to add kwargs... to it.