[Numpy-discussion] histogram help
Mon Jan 30 16:06:22 CST 2012
I still do not fully understand your question but what I do in such cases is to construct a very simple array and test the functions.
The help of numpy.histogram2d or numpy.histogramdd (for more than two dims) might help here.
So I guess, basically you want to ignore the x,y positions and just look at the combined distribution of the Z values?
In this case, you would just need the numpy.histogram (the 1d version).
Note that the histogram returns the numbers and the bin-borders.
On 30.01.2012, at 20:27, Ruby Stevenson wrote:
> Sorry, I realize I didn't describe the problem completely clear or correct.
> the (x,y) in this case is just many co-ordinates, and each coordinate
> has a list of values (Z value) associated with it. The bins are
> allocated for the Z.
> I hope this clarify things a little. Thanks again.
> On Mon, Jan 30, 2012 at 2:21 PM, Ruby Stevenson <email@example.com> wrote:
>> hi, all
>> I am trying to figure out how to do histogram with numpy
>> I have a three-dimension array A[x,y,z], another array (bins) has
>> been allocated along Z dimension, z'
>> how can I get the histogram of H[ x, y, z' ]?
>> thanks for your help.
> NumPy-Discussion mailing list
More information about the NumPy-Discussion