Repository navigation
add cupy.quantile - #4370
Merged
Merged
add cupy.quantile#4370
Conversation
TST: check valid range of q for percentile as well DOC: add quantile to API docs
toslunar
reviewed
Dec 1, 2020
| ===================== | ||
|
|
||
| .. https://docs.scipy.org/doc/scipy/reference/stats.html | ||
| .. https://numpy.org/doc/stable/reference/routines.statistics.html |
Member
There was a problem hiding this comment.
The change to this line will be backported.
toslunar
reviewed
Dec 1, 2020
Co-authored-by: Toshiki Kataoka <[email protected]>
Member
|
pfnCI, test this please. |
Member
|
Jenkins CI test (for commit 64f8b68, target branch master) succeeded! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a simple PR to add
cupy.quantilewhich is the same ascupy.percentilebut with q in the range [0, 1] rather than [0, 100].This just reuses the existing
cupy.percentileimplementation, so there is not much new to review. The test cases are also copies of the tests for percentile, but using floating pointqin the range [0, 1].numpy.quantilewas introduced in NumPy 1.15 which I think CuPy now requires, so I didn't do anywith_requireschecks in the tests.One area to consider
I added range checks on
qas in NumPy, but these require device synchronization, so it may not be desirable. If we don't want this, I can just remove use of_quantile_is_validand the two*_out_of_range_qtests.