histc(input: Tensor, bins: _int = ..., min: _float = ..., max: _float = ...)Implementing kernel
C++ engine symbols that back this Python API.Compute a histogram of input with bins equally-spaced bins.
Bins span [min, max] inclusive of the upper edge; values outside
the range, and NaN, are discarded. If min == max (both 0 by
default), the range is the data's; a range that is still one point
v widens to [v - 1, v + 1].
Parameters
inputTensorSource tensor (floating-point).
binsint= 100Number of bins.
minfloat= 0Lower edge.
maxfloat= 0Upper edge.
min == max == 0 means "use data range".Returns
Tensor1-D tensor of length bins containing counts, in input's
dtype.
Raises
ValueErrormin > max, or the range is not finite.Notes
Bin width is . Right edge is inclusive of the final bin only.
Examples
>>> import lucid
>>> x = lucid.tensor([0.1, 0.5, 0.9, 1.1])
>>> lucid.histc(x, bins=4, min=0, max=1)
Tensor([1, 1, 0, 1])