[issue35775] Add a general selection function to statistics

2020-03-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue35775] Add a general selection function to statistics

2019-05-24 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Steven, thanks for taking the time to reviewing my patch. Regarding the relevance of add select(), I was looking for work to do in the bug tracker and found some references to it (https://bugs.python.org/issue21592#msg219934 for example). I knew that there

[issue35775] Add a general selection function to statistics

2019-01-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: Rémi. I've read over your patch and have some comments: (1) You call sorted() to produce a list, but then instead of retrieving the item using ``data[i-1]`` you use ``itertools.islice``. That seems unnecessary to me. Do you have a reason for using

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I'm very interested in adding quartiles and > general quantiles/fractiles, but I'm not > so sure that this select(data, index) function would be useful. I concur with Steven. -- ___ Python tracker

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Fri, Jan 18, 2019 at 11:13:41PM +, Rémi Lapeyre wrote: > Wouldn't be the 5-th percentile be select(data, round(len(data)/20)? Oh if only it were that simple! Using the method you suggest, the 50th percentile is not the same as the median unless the

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Wouldn't be the 5-th percentile be select(data, round(len(data)/20)? -- ___ Python tracker ___ ___

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm very interested in adding quartiles and general quantiles/fractiles, but I'm not so sure that this select(data, index) function would be useful. Can you explain how you would use this? -- ___ Python tracker

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +rhettinger, steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch pull_requests: +11337, 11338 stage: -> patch review ___ Python tracker ___ ___

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +11337 stage: -> patch review ___ Python tracker ___ ___

[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : Like discussed in #30999, the attached PR adds a general selection function to the statistics module. This allows to simply get the element at a given quantile of a collection. https://www.cs.rochester.edu/~gildea/csc282/slides/C09-median.pdf --