Support more interpolation methods in `cupy.percentile` and `cupy.quantile`
See original GitHub issueSince NumPy 1.22, numpy.percentile
and numpy.quantile
have new methods to estimate the percentile/quantile.
https://numpy.org/devdocs/reference/generated/numpy.quantile.html https://numpy.org/devdocs/reference/generated/numpy.percentile.html
method
s that needs to be implemented:
-
inverted_cdf
-
averaged_inverted_cdf
-
closest_observation
-
interpolated_inverted_cdf
-
hazen
-
weibull
-
median_unbiased
-
normal_unbiased
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
cupy.percentile — CuPy 11.3.0 documentation
method (str) – Interpolation method when a quantile lies between two data points. linear interpolation is used by default. Supported interpolations ...
Read more >cupyx.scipy.interpolate.BarycentricInterpolator — CuPy 12.0 ...
Allows evaluation of the polynomial, efficient changing of the y values to be interpolated, and updating by adding more x values. For reasons...
Read more >Interpolation (cupyx.scipy.interpolate) — CuPy 12.0.0b2 ...
Compute the (coefficients of) interpolating B-spline. splder (tck[, n]). Compute the spline representation of the derivative of a given spline.
Read more >latest PDF - CuPy Documentation
Profiler: Supports profiling code using CUDA Profiler and NVTX ... The cupy.asnumpy() method returns a NumPy array (array on the host), ...
Read more >cupy.interp — CuPy 11.4.0 documentation
cupy.interp# ... One-dimensional linear interpolation. ... This function may synchronize if left or right is not already on the device. ... Created using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @pri1311! Would you make a PR for your change? I’ll review it next week as I have days off this week.
@takagi commit - https://github.com/cupy/cupy/compare/master...pri1311:cupy:interpolation
Branch - https://github.com/pri1311/cupy/tree/interpolation
Weird thing though: When I changed the shape of the array from
a = testing.shaped_random((10, 2, 3, 2), xp, dtype) ap = a.copy()
toa = testing.shaped_random((4, 3, 10, 2, 8), xp, dtype)
indef test_quantile_overwrite
it no longer fails.