[SciPy-User] equivalent of R quantile() function in scipy
Tue Dec 4 10:43:08 CST 2012
On Tue, Dec 4, 2012 at 11:44 AM, Jonathan Helmus <email@example.com> wrote:
> On 12/04/2012 11:26 AM, Pauli Virtanen wrote:
>> 04.12.2012 18:20, Jonathan Helmus kirjoitti:
>>> numpy.percentile can can accept a sequence of percentiles as the second
>>> In : probs = [10.0, 30.0, 50.0, 70.0, 90.0]
>>> In : a = np.arange(100)
>>> In : np.percentile(a, probs)
>>> In : [scipy.stats.scoreatpercentile(a, i) for i in probs]
>> It could be useful if someone would take a look if that the
>> implementation in scipy can be easily adapted for that.
> NumPy's implementation is pure python and quite straightforward, I'll
> put together a pull request to include similar functionality in SciPy.
> Adding the limit optional parameter shouldn't be too hard.
Great thanks for looking at this. Could you also look at adding an
axis keyword to scoreatpercentile? Should be simple, but IIRC this was
missing the last time I looked at this.
More information about the SciPy-User