[issue26913] statistics.mean of bools

2016-05-02 Thread R. David Murray
R. David Murray added the comment: Already fixed: #24068. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> statistics module - incorrect results with boolean input ___ Python tracker

[issue26913] statistics.mean of bools

2016-05-02 Thread Zachary Ware
Changes by Zachary Ware : -- versions: -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue26913] statistics.mean of bools

2016-05-02 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue26913] statistics.mean of bools

2016-05-02 Thread Peter Norvig
New submission from Peter Norvig: mean([True, True, True, False]) should be 0.75, but it returns 0.25. The fix is to change _sum so that when the type is bool, the result should be coerced to int, not bool. Why it is important for statistics.mean to work with bools: It is natural to say someth