The quantile function with unitful quantities works fine without weights:
julia> x = rand(10) .* 1u"m"
10-element Vector{Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}:
0.4560455822873759 m
0.4307569757744304 m
0.4840857672199611 m
0.7853776015820557 m
0.5865440640498318 m
0.15996668178343565 m
0.042204899384880146 m
0.3310111766347721 m
0.8691765138294111 m
0.5325561348479884 m
julia> quantile(x, 0.5)
0.4700656747536685 m
The quantile function with unitful quantities works fine without weights:
However, if we try to pass weights, it crashes:
This method definition is too restrictive: https://github.com/JuliaStats/StatsBase.jl/blob/8696d51cddf65b7fd927fccafdf8b6255cfb0ee9/src/weights.jl#L707