Re: [Python-ideas] NAN handling in the statistics module

2019-01-09 Thread Jonathan Fine
I've just read statistics.py, and found something that might be usefully considered along with the NaN question. >>> median([1]) 1 >>> median([1, 1]) 1.0 To record this, and associated behaviour involving Fraction, I've added: Division by 2 in statistics.median: https://bugs.python.org/issue35698

Re: [Python-ideas] NAN handling in the statistics module

2019-01-09 Thread Oscar Benjamin
On Wed, 9 Jan 2019 at 05:20, Steven D'Aprano wrote: > > On Mon, Jan 07, 2019 at 11:27:22AM +1100, Steven D'Aprano wrote: > > [...] > > I propose adding a "nan_policy" keyword-only parameter to the relevant > > statistics functions (mean, median, variance etc), and defining the > > following polici