-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add nanquantile
function
#166
Conversation
OK — actually this is better news — So the current benchmarks have, for a 300x100000 array:
So adding this to numbagg probably does make sense. Unfortunately we'll probably only be able to run for a single quantile, as long as we stay using I need to clean up the code a lot. |
OK, actually a couple of hours of work showed me this is very possible, by managing the So this works, and is about 4x faster than I need to clean up the benchmarks, but I'll merge for now. This has mostly been me, but if anyone has substantive feedback on the code, that would be very welcome. |
An attempt to solve #161
But:
guvectorize
and take multiple quantiles. Somewhat understandably, it doesn't know thatquantiles
is a fixed list of values, rather than an array to broadcast over.I haven't done benchmarks for the version at https://krstn.eu/np.nanpercentile()-there-has-to-be-a-faster-way/, or xclim's version.
If anyone wants to take this and test if those versions are indeed faster, that would be helpful to see.