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
Most of the basic statistics e.g. minimum, maximum, and mean, functions can take a function as the first argument, but median doesn't seem to have such a method. Would it be good to add one, for consistency?
This is similar to JuliaLang/Statistics.jl#26 about adding the by keyword, except that by only affects how the elements are ordered and selected, rather than actually transforming the array.
It might be as simple as median(f, x) = median!(f.(x)), though probably needs some type restrictions to play nicely with the other methods.
The text was updated successfully, but these errors were encountered:
Most of the basic statistics e.g.
minimum
,maximum
, andmean
, functions can take a function as the first argument, butmedian
doesn't seem to have such a method. Would it be good to add one, for consistency?This is similar to JuliaLang/Statistics.jl#26 about adding the
by
keyword, except thatby
only affects how the elements are ordered and selected, rather than actually transforming the array.It might be as simple as
median(f, x) = median!(f.(x))
, though probably needs some type restrictions to play nicely with the other methods.The text was updated successfully, but these errors were encountered: