[issue24068] statistics module - incorrect results with boolean input

2018-04-08 Thread Wolfgang Maier
Wolfgang Maier added the comment: Fixed as part of resolving issue 25177. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue24068] statistics module - incorrect results with boolean input

2015-05-20 Thread Matteo Dell'Amico
Changes by Matteo Dell'Amico de...@linux.it: -- nosy: +della ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24068 ___ ___ Python-bugs-list mailing

[issue24068] statistics module - incorrect results with boolean input

2015-05-11 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24068 ___ ___

[issue24068] statistics module - incorrect results with boolean input

2015-05-03 Thread Mark Dickinson
Mark Dickinson added the comment: I wonder if it would be better to reject Bool data in this context? It's not uncommon (and quite useful) in NumPy world to compute basic statistics on arrays of boolean dtype: the sum of such an array gives a count of the `True`s, and the mean gives the

[issue24068] statistics module - incorrect results with boolean input

2015-05-02 Thread Wolfgang Maier
Wolfgang Maier added the comment: uploading an alternate, possibly slightly clearer version of the patch -- Added file: http://bugs.python.org/file39269/statistics._sum.v2.patch ___ Python tracker rep...@bugs.python.org

[issue24068] statistics module - incorrect results with boolean input

2015-05-01 Thread R. David Murray
R. David Murray added the comment: I wonder if it would be better to reject Bool data in this context? Bool is only a numeric type for historical reasons. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue24068] statistics module - incorrect results with boolean input

2015-05-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: The patch seems simple and straightforward enough. It just needs some tests, and a Round Tuit. -- assignee: - steven.daprano ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24068

[issue24068] statistics module - incorrect results with boolean input

2015-05-01 Thread Steven D'Aprano
Changes by Steven D'Aprano steve+pyt...@pearwood.info: -- stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24068 ___ ___

[issue24068] statistics module - incorrect results with boolean input

2015-04-28 Thread Wolfgang Maier
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de: Removed file: http://bugs.python.org/file39220/statistics._sum.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24068 ___

[issue24068] statistics module - incorrect results with boolean input

2015-04-28 Thread Wolfgang Maier
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de: Added file: http://bugs.python.org/file39221/statistics._sum.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24068 ___

[issue24068] statistics module - incorrect results with boolean input

2015-04-28 Thread Wolfgang Maier
New submission from Wolfgang Maier: the mean function in the statistics module gives nonsensical results with boolean values in the input, e.g.: mean([True, True, False, False]) 0.25 mean([True, 1027]) 0.5 This is an issue with the module's internal _sum function that mean relies on.