JuliaStats / Statistics.jl

The Statistics stdlib that ships with Julia.
https://juliastats.org/Statistics.jl/dev/
Other
72 stars 40 forks source link

quantile for AbstractArrays #10

Open bkamins opened 5 years ago

bkamins commented 5 years ago

Currently quantile does not support AbstractArrays except for AbstractVectors. The reason is that we use collect for a general iterable, which retains its dimensionality.

You can write

quantile(vec([1 2; 3 4]), 0.5)

to get what you want but I would recommend supporting quantile for general arrays. If we agree that we want this feature I can propose a PR.

stanbiryukov commented 4 years ago

JuliaLang/julia#33835 I think passing dims as a function to quantile makes sense and is consistent with all other basic stats functions. Did you happen to make a PR @bkamins

bkamins commented 4 years ago

Currently I am swamped with trying to push DataFrames.jl v1.0 out. So feel free to make a PR if you wish.