sample : array_like
Data to histogram passed as a sequence of D arrays of length N, or
as an (N,D) array.
values : array_like
The values on which the statistic will be computed. This must be
the same shape as x.
statistic : string or callable, optional
The statistic to compute (default is ‘mean’).
The following statistics are available:
- ‘mean’ : compute the mean of values for points within each bin.
Empty bins will be represented by NaN.
- ‘median’ : compute the median of values for points within each
bin. Empty bins will be represented by NaN.
- ‘count’ : compute the count of points within each bin. This is
identical to an unweighted histogram. values array is not
- ‘sum’ : compute the sum of values for points within each bin.
This is identical to a weighted histogram.
- function : a user-defined function which takes a 1D array of
values, and outputs a single numerical statistic. This function
will be called on the values in each bin. Empty bins will be
represented by function(), or NaN if this returns an error.
bins : sequence or int, optional
The bin specification:
- A sequence of arrays describing the bin edges along each dimension.
- The number of bins for each dimension (nx, ny, ... =bins)
- The number of bins for all dimensions (nx=ny=...=bins).
range : sequence, optional
A sequence of lower and upper bin edges to be used if the edges are
not given explicitely in bins. Defaults to the minimum and maximum
values along each dimension.