numpy.histogramdd(sample, bins=10, range=None, normed=False, weights=None)
[source]
Compute the multidimensional histogram of some data.
Parameters: |
sample : array_like The data to be histogrammed. It must be an (N,D) array or data that can be converted to such. The rows of the resulting array are the coordinates of points in a D dimensional polytope. bins : sequence or int, optional The bin specification:
range : sequence, optional A sequence of lower and upper bin edges to be used if the edges are not given explicitly in normed : bool, optional If False, returns the number of samples in each bin. If True, returns the bin density weights : (N,) array_like, optional An array of values |
---|---|
Returns: |
H : ndarray The multidimensional histogram of sample x. See normed and weights for the different possible semantics. edges : list A list of D arrays describing the bin edges for each dimension. |
See also
histogram
histogram2d
>>> r = np.random.randn(100,3) >>> H, edges = np.histogramdd(r, bins = (5, 8, 4)) >>> H.shape, edges[0].size, edges[1].size, edges[2].size ((5, 8, 4), 6, 9, 5)
© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.histogramdd.html