Closed
Description
See this asymmerty:
julia> using Statistics
julia> v = randn(10);
julia> mean(abs, v)
0.6470633745357454
julia> median(abs, v)
ERROR: MethodError: no method matching median(::typeof(abs), ::Vector{Float64})
Closest candidates are:
median(::Any) at ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/Statistics/src/Statistics.jl:855
Stacktrace:
[1] top-level scope
@ REPL[6]:1
Is there any reason for it? If not, a method for median
should be added that takes a function as the first argument.
Metadata
Metadata
Assignees
Labels
No labels