Wrote a new library - Comments and suggestions please!
taleinat at gmail.com
Mon Sep 26 13:23:04 CEST 2011
The library is called RunningCalcs and is useful for running several
calculations on a single iterable of values.
I'd like some input on how this could be made more useful and how to
spread the word about it.
The library contains the base RunningCalc class and implementations of
sub-classes for common calculations: sum, min/max, average, variance &
standard deviation, n-largest & n-smallest. Additionaly a utility
function apply_in_parallel() is supplied which makes running several
calculations on an iterable easy (and fast!).
mean_rc, stddev_rc = RunningMean(), RunningStdDev()
for x in values:
mean, stddev = mean_rc.value, stddev_rc.value
Examples using apply_in_parallel():
mean, stddev = apply_in_parallel(values, [RunningMean(),
five_smallest, five_largest = apply_in_parallel(values,
Comments and suggestions would be highly appreciated!
More information about the Python-list