-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make median
non-mutating on arrays.
#17154
Conversation
How many more of these might there be? |
This is the only call to |
#16091 strikes again?
|
|
Passing a mutating function to a higher-order function is always a big red flag. It happens here because this is a strange case where the function returns a new result, but is allowed to overwrite its input. |
…17164) * Add test for Issue JuliaLang#17153 and PR JuliaLang#17154 * Fix whitespaces
Due to a change in the behaviour of
mapslices
(#16260),median(X,k)
would mutate the underlying array. Fixes #17153.