Wrote a new library - Comments and suggestions please!
joncle at googlemail.com
Mon Sep 26 22:07:43 CEST 2011
On Sep 26, 12:23 pm, Tal Einat <talei... at gmail.com> wrote:
> 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!).
> Straight-forward example:
> 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,
> [RunningNSmallest(5), RunningNLargest(5)])
> Comments and suggestions would be highly appreciated!
You may not of heard of it, but the SAS language has something called
PROC FREQ... I'm imagining that maybe this is where you should be
taking this. Sorry I can't comment on the code, as I haven't really
got time, but have a look! (I'd be willing to invest sometime with
you, if you agree that's where something like this should be going...)
More information about the Python-list