[Numpy-discussion] PR to add "weights" option to np.quantile

Chun-Wei Yuan chunwei.yuan at gmail.com
Thu Sep 13 16:47:00 EDT 2018


Hi all,

I have a long-standing PR to add a "weights" option to
np.quantile/percentile:

https://github.com/numpy/numpy/pull/9211

For a little background, there are quite a few ways to define "quantile" to
begin with.  Numpy defines it the same way as R's default (Type 7):

https://www.rdocumentation.org/packages/stats/versions/3.5.0/topics/quantile

What PR 9211 does is introducing a "weights" option while staying
consistent with the Type 7 definition of quantile.

There is certainly support on adding this feature, but as also can be
perused from the thread, there are doubts on

1.) what is the right way to define "weighted" quantile?
2.) whether Numpy should support other types of quantiles in the first
place, etc.

I've stated my answers to those questions in the thread.  This PR has
fallen off the radar and needs a little popular jolt to get some movement.
Please chime in to keep it alive.

Best,

Chun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180913/7b32e3c0/attachment.html>


More information about the NumPy-Discussion mailing list