[Numpy-discussion] Computing Simple Statistics When Only they Frequency Distribution is Known
Charles R Harris
Sun Nov 29 19:33:49 CST 2009
On Sun, Nov 29, 2009 at 6:15 PM, Anne Archibald
> 2009/11/28 Wayne Watson <firstname.lastname@example.org>:
> > Anne Archibald wrote:
> >> 2009/11/28 Wayne Watson <email@example.com>:
> >>> 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.
> > How would I do that?
> Obtain a copy of recent numpy source code - a .tar file from the
> website, or using SVN, or git. Then add the feature plus some tests,
> confirm that the tests pass, and post a request and your patch to the
> bug tracker.
You might also want to use average as a starting point.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion