[Python-ideas] Running average and stdev in the statistics module?
Steven D'Aprano
steve at pearwood.info
Fri May 10 07:33:01 EDT 2019
On Mon, May 06, 2019 at 08:10:44PM +0300, Serge Matveenko wrote:
> On Sun, May 5, 2019 at 1:08 PM Luca Baldini <luca.baldini at pi.infn.it> wrote:
> >
> > Hi here,
> > I wonder if the idea of adding to the statistics module a class to
> > calculate the running statistics (average and standard deviation) of a
> > generic input data stream has ever come up in the past.
[...]
> Personally, I would definitely use this in a number of places in the
> real-life code I contribute to.
>
> The problem that I have with this idea is it's not clear how to store
> the data in an accumulator class. What about cases with different
> contexts in asyncio and/or multithreading code?
Can you give an example of the sort of thing you might want to do?
Thanks,
--
Steven
More information about the Python-ideas
mailing list