Python wrappers
Public Python APIs implemented by this engine symbol.Compute an N-dimensional histogram from a 2-D sample matrix.
Given an input tensor of shape (N, D) whose rows are D-dimensional
observations, partitions each dimension into the corresponding number
of bins and counts samples falling in each D-dimensional cell. When
density is true each cell is divided by (cell_volume * N).
See Also
histogram_op, histogram2d_op : Lower-dimensional specialisations.
Parameters
aTensorImplPtr2-D tensor of shape
(N, D); row k is the k-th sample.binsvector<int64>Length-D vector giving the bin count along each dimension.
rangesvector<pair<double, double>>Length-D vector of
(lo, hi) pairs, one range per dimension.densityboolIf true, normalise to a probability density.
Returns
vector<TensorImplPtr>[counts, edges] where counts is a D-dimensional tensor whose shape equals bins, and edges is a 1-D tensor of length sum(bins[d] + 1) containing the per-dimension edge arrays concatenated in order. Both dtype F64.
Notes
Non-differentiable. Always executes on the CPU stream.