<div dir="ltr">That would be great.  I just used np.argsort because it was familiar to me.  Didn't know about the C code.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 21, 2017 at 3:43 PM, Joseph Fox-Rabinovitz <span dir="ltr"><<a href="mailto:jfoxrabinovitz@gmail.com" target="_blank">jfoxrabinovitz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>While #9211 is a good start, it is pretty inefficient in terms of the fact that it performs an O(nlogn) sort of the array. It is possible to reduce the time to O(n) by using a similar partitioning algorithm to the one in the C code of percentile. I will look into it as soon as I can.<br><br></div>    -Joe<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 21, 2017 at 5:34 PM, Chun-Wei Yuan <span dir="ltr"><<a href="mailto:chunwei.yuan@gmail.com" target="_blank">chunwei.yuan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Just to provide some context, 9213 actually spawned off of this guy:</div><div><br></div><a href="https://github.com/numpy/numpy/pull/9211" target="_blank">https://github.com/numpy/numpy<wbr>/pull/9211</a><br><div><br></div><div>which might address the weighted inputs issue Joe brought up.</div><span class="m_7004371194560247163HOEnZb"><font color="#888888"><div><br></div><div>C</div></font></span></div><div class="m_7004371194560247163HOEnZb"><div class="m_7004371194560247163h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 21, 2017 at 2:21 PM, Joseph Fox-Rabinovitz <span dir="ltr"><<a href="mailto:jfoxrabinovitz@gmail.com" target="_blank">jfoxrabinovitz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I think that there would be a very good reason to have a separate function if we were to introduce weights to the inputs, similarly to the way that we have mean and average. This would have some (positive) repercussions like making weighted histograms with the Freedman-Diaconis binwidth estimator a possibility. I have had this change on the back-burner for a long time, mainly because I was too lazy to figure out how to include it in the C code. However, I will take a closer look.<br><br></div>Regards,<br><br></div>    -Joe<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_7004371194560247163m_2519186856567722701h5">On Fri, Jul 21, 2017 at 5:11 PM, Chun-Wei Yuan <span dir="ltr"><<a href="mailto:chunwei.yuan@gmail.com" target="_blank">chunwei.yuan@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_7004371194560247163m_2519186856567722701h5"><div dir="ltr">There's an ongoing effort to introduce quantile() into numpy.  You'd use it just like percentile(), but would input your q value in probability space (0.5 for 50%):<div><br></div><div><a href="https://github.com/numpy/numpy/pull/9213" target="_blank">https://github.com/numpy/numpy<wbr>/pull/9213</a><br></div><div><br></div><div>Since there's a great deal of overlap between these two functions, we'd like to solicit opinions on how to move forward on this.</div><div><br></div><div>The current thinking is to tolerate the redundancy and keep both, using one as the engine for the other.  I'm partial to having quantile because 1.) I prefer probability space, and 2.) I have a PR waiting on quantile().</div><div><br></div><div>Best,</div><div><br></div><div>C</div></div>
<br></div></div>______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/numpy-<wbr>discussion</a><br>
<br></blockquote></div><br></div>