[Python-ideas] Re: Heterogeneous numeric data in statistics library

2022-05-14 Thread Christopher Barker
> > > >I was going to suggest the same thing: type casting can have > >non-obvious effects, so explicit is better than implicit in this case. > > Aye. Did you mean to send this just to me and not the list? > nope -- I know i"m in the minority but i really wish lists had reply-to set to the list.

[Python-ideas] Re: Heterogeneous numeric data in statistics library

2022-05-12 Thread Cameron Simpson
On 13May2022 00:17, Steven D'Aprano wrote: >Users of the statistics module, how often do you use it with >heterogeneous data (mixed numeric types)? Disclaimer: I am not yet a user of the statistics module. >With mixed types, the functions usually try to coerce the values into a >sensible common

[Python-ideas] Re: Heterogeneous numeric data in statistics library

2022-05-12 Thread Chris Angelico
On Fri, 13 May 2022 at 00:20, Steven D'Aprano wrote: > > If you are a user of statistics, how important to you is the ability to > **mix** numeric types, in the same data set? > > Which combinations do you care about? > I'm only a very small-time user of it, but the only combination I use is int

[Python-ideas] Re: Heterogeneous numeric data in statistics library

2022-05-12 Thread Danilo J. S. Bellini
IMHO, mixing custom types in this context is usually not required, as long as at least int-to-anything-else typecast is possible. Currently it's done only when there is at least one non-int and when the result can't be represented as int, that is: >>> statistics.mean([1, 2, 3, 6]) 3 >>> statistics

[Python-ideas] Re: Heterogeneous numeric data in statistics library

2022-05-12 Thread Jonathan Fine
Hi Steve Today's XKCD is on 'Selection Bias' and it is set in a statistics conference: https://xkcd.com/2618/ According to its PEP the statistics module provides "common statistics functions such as mean, median, variance and standard deviation". You ask "if you are a user of statistics, how imp