-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: nanpercentile -> array_algos.quantile #44655
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
Conversation
jbrockmendel
commented
Nov 28, 2021
- closes #xxxx
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
assert mask.shape == values.shape | ||
result = [ | ||
_nanpercentile_1d(val, m, qs, na_value, interpolation=interpolation) | ||
for (val, m) in zip(list(values), list(mask)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: While refactoring: are the list
calls necessary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wondered the same thing and don't have a good answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the rationale for this? Currently all nan* functions live in nanops.py, which is a nice pattern?
these two functions are used exclusively in this file, and don't have any intra-nanops dependencies (e.g. _get_values, _wrap_results). There's nothing wrong with them being in nanops, but array_algos.quantile is better choice, and remains tightly-scoped. |
this is fine as it decouples the dependency structure a big. can you rebase |
rebased + greenish |