[Numpy-discussion] histogram: sum up values in each bin

Tim Michelsen timmichelsen at gmx-topmail.de
Thu Aug 27 12:49:23 EDT 2009


> Tim, do you mean, that you want to apply other functions, e.g. mean or
> variance, to the original values but calculated per bin?
Sorry that I forgot to add this. Shame.

I would like to apply these mathematical functions on the original values
stacked in the respective bins.

For instance: 

The sample data measures the wight of an animal.

1) historam give a count of how many values are in each bin. 

I would like to calculate the average wight of all animals 
sorted in bin1, bin2 etc.

This is also useful in where you have a time component.

In Spreadsheets I would use a '=' to reference to the original data and then
either sum it up or count it per class.

I hope this is somehow understandable.

Thanks,
Timmie




More information about the NumPy-Discussion mailing list