From: David H. <dav...@gm...> - 2006-10-25 13:25:51
|
[snip] Vincent, I may be wrong, but it looks like you could use a weighted histogramdd (see other thread where I sent a patch to do so). You run it once to find the number of sample in each bin, then again with weights=value, normed=False to find the total weight in each bin, then you can divide each bin by the number of samples to find the average. N, d = histogramdd(cells) W, d = histogramdd(cells, weights = value) average = W/N David |