-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undeprecate no-dot syntax for quantile() and nquantile() #1150
Comments
To complete a bit: Another solution would be to define a custom broadcasting method for |
@nalimilan Sorry for the delay. I think the best solution is just to undeprecate non-broadcast calls to |
No problem. You just have to remove the |
But won’t that undeprecate all of these functions? Is that what we want? Distributions.jl/src/deprecates.jl Lines 27 to 31 in 20c91d9
Also, why would we add the definition of |
Right, you should only remove |
Okay. Do you think it’s only |
Yes. |
This issue picks up where JuliaStats/StatsBase.jl#586 left off. At issue is the following snippet in the Distributions package:
Distributions.jl/src/deprecates.jl
Line 39 in 20c91d9
The macro affects the
quantile()
andnquantile()
functions, of which the former is used by StatsBase in this line.According to @nalimilan, StatsBase relies on the deprecated behavior. This is because when
quantile()
is broadcasted over the given weights/probabilities (second param,p::Union{AbstractArray, Tuple{Vararg{Real}}}
),_quantilesort!
is run twice on the same parameter (first param,v::AbstractVector
). See this code in the Statistics package where the sorting function would be broadcast over using the new syntax requested by Distributions. In any case, requiring broadcasting would mean requiring the first parameter to be sorted twice.Would it be best to un-deprecate this functionality, or is there another course? For now, using Statistics as per its own documentation gives the user a deprecation warning, which is… not ideal, especially for first-time users, of which I’m one.
The text was updated successfully, but these errors were encountered: