Repository navigation
BUG: Added/fixed functionality for infinite and negative infinite values in numpy.quantile(). - #21343
alajoieumich wants to merge 5 commits into
Conversation
…ues in numpy.quantile().
…ues in numpy.quantile().
…ues in numpy.quantile().
…ues in numpy.quantile().
seberg
left a comment
There was a problem hiding this comment.
While I think something like this makes sense, the current code seems much too complicated to me. For one thing also the new path should be vectorized.
One approach may be to see where a == b, and only do the calculation where it is not.
Another thing is that it would be nice if the isinf check could be quick.
I am not actually this matters in practice, since usually, the number of quantiles calculated is much smaller than the number of points in the dataset. But some idea or benchmarking might be nice.
| This method is probably the best method if the sample | ||
| distribution function is known to be normal. | ||
| This method gives continuous results using: | ||
|
|
There was a problem hiding this comment.
Can you please revert all of the above formatting changes. I am not sure if they are right, but they are also unrelated to anything in this PR.
The same goes for all of the doc changes after your actual changes.
|
Closing, needs work and it has been stalled for a year. There is another PR that hits closer to home open also (although also stalled, so picking off from that discussion would be fine). |
Changes made in numpy/lib/function_base.py and basic tests added in numpy/lib/tests/test_function_base.py. Code is somewhat work in progress- see comments on #21091.