Open
Description
The absence of an init
kwarg like is available with reduce
and sum
makes mean
compose less well with e.g. skipmissing
. I'm finding myself using let y=collect(skipmissing(x)); isempty(y) ? missing : mean(y) end
when I should be able to just say mean(skipmissing(x); init=missing)
.
There may be other reductions than mean
and median
in Statistics.jl that also should have init
added, but those are the two I've needed (median isn't quite a reduction technically, but it's close enough that an init
kwarg would be useful).
Metadata
Metadata
Assignees
Labels
No labels