[Numpy-discussion] Computing Simple Statistics When Only they Frequency Distribution is Known

Anne Archibald peridot.faceted at gmail.com
Sat Nov 28 22:50:57 EST 2009


2009/11/28 Wayne Watson <sierra_mtnview at sbcglobal.net>:
>
> I was only illustrating a way that I would not consider, since the
> hardware has already created the pdf. I've already coded it pretty much
> as you have suggested. As I think I mention ed above, I'm a bit
> surprised numpy doesn't provide the code you suggest as part of some
> function. CalcSimplefromPDF(xvalues=mydatarray, avg=ture, minmax=true,
> ...).

Feel free to submit an implementation to numpy's issue tracker. I
suggest modifying mean, std, and var (at least) so that, like average,
they take an array of weights.

Anne



More information about the NumPy-Discussion mailing list