-
Notifications
You must be signed in to change notification settings - Fork 40
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
Option to require median to return a value from passed collection #98
Comments
Yes, we should expose that. A possible function name would be |
|
See also previous discussion at JuliaLang/julia#19359. I'd rather add arguments to |
The "median, but necessarily from the original dataset" is also called medoid. So this could be the name of a new function. Compared to |
Python's statistics has
median_low
andmedian_high
to give the lower and higher value in the passed array if the array has an even number of elements. I do not see an analogous method in Julia or a way to specify any sort of behavior that will guarantee that the result of median comes from the underlying array.Of course, it is possible to check the length of the array to see if its even but that doesn't solve the problem of efficiently getting the 2 values in the array that are the median.
It would be useful to be able to specify that I want the return value from median to be a value from the passed collection.
The text was updated successfully, but these errors were encountered: