scipy/scipy — pull request #173 by jakevdp (2012-03-02 02:47:43+00:00)
Title: ENH: binned statistics

This PR adds some functions to the stats module to perform binned statistics: essentially a generalization of the histogram functions. Where `np.histogram` bins the data and counts the points per bin, `binned_statistic` bins the data and computes the sum, mean, median, or user-defined statistic of the values of points within each bin.

I developed this code for an astronomy datamining package I'm working on. I thought it might be useful to include in scipy.