question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support more interpolation methods in `cupy.percentile` and `cupy.quantile`

See original GitHub issue

Since 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

methods that needs to be implemented:

  • inverted_cdf
  • averaged_inverted_cdf
  • closest_observation
  • interpolated_inverted_cdf
  • hazen
  • weibull
  • median_unbiased
  • normal_unbiased

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
takagicommented, Aug 17, 2022

Thanks @pri1311! Would you make a PR for your change? I’ll review it next week as I have days off this week.

0reactions
pri1311commented, Aug 14, 2022

@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() to a = testing.shaped_random((4, 3, 10, 2, 8), xp, dtype) in def test_quantile_overwrite it no longer fails.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found