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.
Ruby
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.
Ruby
On Mon, Jan 30, 2012 at 2:21 PM, Ruby Stevenson ruby185@gmail.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.
Ruby
Hi Ruby,
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.
bests Samuel
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.
Ruby
On Mon, Jan 30, 2012 at 2:21 PM, Ruby Stevenson ruby185@gmail.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.
Ruby
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Do you want a histogramm of z for each (x,y) ?
Nadav
________________________________________ From: numpy-discussion-bounces@scipy.org [numpy-discussion-bounces@scipy.org] On Behalf Of Ruby Stevenson [ruby185@gmail.com] Sent: 30 January 2012 21:27 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] histogram help
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.
Ruby
On Mon, Jan 30, 2012 at 2:21 PM, Ruby Stevenson ruby185@gmail.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.
Ruby
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Exactly, histogram of Z, which itself is an array, for each (x, y).
sorry for getting everyone including myself confused :-)
I think I am now using histogram call correctly ... but I now have a slightly different question. It maybe better to ask in a different subject, but here it is any way:
support I will have a sequence of (x, y), and Z, with x, y are coordinates, and Z being an array for third dimension, Is there a better or more efficient way to build up this 3-D array?
thanks
Ruby
On Tue, Jan 31, 2012 at 4:42 AM, Nadav Horesh nadavh@visionsense.com wrote:
Do you want a histogramm of z for each (x,y) ?
Nadav
From: numpy-discussion-bounces@scipy.org [numpy-discussion-bounces@scipy.org] On Behalf Of Ruby Stevenson [ruby185@gmail.com] Sent: 30 January 2012 21:27 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] histogram help
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.
Ruby
On Mon, Jan 30, 2012 at 2:21 PM, Ruby Stevenson ruby185@gmail.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.
Ruby
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Sorry but I don't understand your last question. Better / more efficient than what?
-=- Olivier
Le 2 février 2012 07:14, Ruby Stevenson ruby185@gmail.com a écrit :
Exactly, histogram of Z, which itself is an array, for each (x, y).
sorry for getting everyone including myself confused :-)
I think I am now using histogram call correctly ... but I now have a slightly different question. It maybe better to ask in a different subject, but here it is any way:
support I will have a sequence of (x, y), and Z, with x, y are coordinates, and Z being an array for third dimension, Is there a better or more efficient way to build up this 3-D array?
thanks
Ruby
On Tue, Jan 31, 2012 at 4:42 AM, Nadav Horesh nadavh@visionsense.com wrote:
Do you want a histogramm of z for each (x,y) ?
Nadav
From: numpy-discussion-bounces@scipy.org [
numpy-discussion-bounces@scipy.org] On Behalf Of Ruby Stevenson [ ruby185@gmail.com]
Sent: 30 January 2012 21:27 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] histogram help
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.
Ruby
On Mon, Jan 30, 2012 at 2:21 PM, Ruby Stevenson ruby185@gmail.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.
Ruby
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion