arviz_stats.base.array_stats.histogram2d

arviz_stats.base.array_stats.histogram2d#

array_stats.histogram2d(x, y, bins=None, range=None, weights=None, axis=-1, density=True)#

Compute a batched two-dimensional histogram.

Parameters:
x, yarray_like

Paired samples with identical shapes.

weightsarray_like, optional

Sample weights with the same shape as x and y.

binsNone, str, int or array_like or pair, default None

Bin specification passed to numpy.histogram2d. None or "auto" applies the default two-dimensional bin rule to each marginal, reduced to shared counts over batched input.

rangearray_like, optional

((xmin, xmax), (ymin, ymax)) passed to numpy.histogram2d.

axisint, sequence of int or None, default -1

Axis or axes along which to reduce.

densitybool, default True

Normalize the histogram as a probability density.

Returns:
histogram, x_edges, y_edgesndarray

Histogram values and bin edges, with output dimensions appended after any batch dimensions.