You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
The absence of an
init
kwarg like is available withreduce
andsum
makesmean
compose less well with e.g.skipmissing
. I'm finding myself usinglet y=collect(skipmissing(x)); isempty(y) ? missing : mean(y) end
when I should be able to just saymean(skipmissing(x); init=missing)
.There may be other reductions than
mean
andmedian
in Statistics.jl that also should haveinit
added, but those are the two I've needed (median isn't quite a reduction technically, but it's close enough that aninit
kwarg would be useful).The text was updated successfully, but these errors were encountered: