Open tbeason opened 4 years ago
After also reading #581 I think this issue could be better summarized as saying that in general the type signatures of most of the functions in StatsBase should be relaxed.
Yes many functions should be rewritten to accept any iterator.
Right now,
mean
andstd
from Statistics returnmissing
if the input has an element that ismissing
.skewness
andkurtosis
from this package error because their method signatures do not allowAbstractArray{Union{Missing,T},N} where {T<:Real,N}
. This is further a problem because an array of that type is not even guaranteed to have anymissing
elements.I propose to change the behavior so that the functions accept these arrays and propagate
missing
if necessary (either naturally or short circuited).I would think that maybe this just needs to be changed in
src/common.jl
but am uncertain. If that is all that needs to happen, I can make the PR.