This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients WarrenWeckesser, gaoxinge, mark.dickinson, rhettinger, steven.daprano, taleinat, tim.peters
Date 2019-10-30.05:21:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20191030052117.GM3574@ando.pearwood.info>
In-reply-to <1572404789.15.0.0456001767678.issue38382@roundup.psfhosted.org>
Content
Thank you for your comments, but accepting non-floats like Decimal and 
Fraction (and int, of course!) is a hard requirement for the statistics 
module. fmean will naturally convert any data to float for speed, but 
the other means will attempt to keep the original data type if possible, 
so that the mean() of Decimals will be a Decimal, the mean of Fractions 
will be a Fraction, etc.

The median_low and median_high functions don't require numbers at all, 
the data points just need to be ordinal data and support sorting. The 
mode function doesn't even require ordinal data, it can work with 
nominal data. That is part of the definition of median and mode, and 
will not change.

http://intellspot.com/nominal-vs-ordinal-data/

So long as Python support IEEE-754 floating point arithmetic, which is 
the most common standard for floating point, there will be NANs and 
INFs. We should not reject them unnecessarily. You can always pre-filter 
your data before passing it the statistics module.

Why do you object to float INF?
History
Date User Action Args
2019-10-30 05:21:25steven.dapranosetrecipients: + steven.daprano, tim.peters, rhettinger, mark.dickinson, taleinat, gaoxinge, WarrenWeckesser
2019-10-30 05:21:25steven.dapranolinkissue38382 messages
2019-10-30 05:21:25steven.dapranocreate