histogram(
values,options):Histogram
Defined in: packages/distribution/src/sample-statistics.ts:210
Histogram with NumPy’s np.histogram semantics: bin i is [edges[i], edges[i + 1]) and the last bin is closed on
both ends. { bins } spans the sample’s range with equal-width bins, widened by 0.5 on each side when the sample is
constant. { edges } uses the supplied edges, and values outside them are not counted. The input is not mutated.
Parameters
Section titled “Parameters”values
Section titled “values”options
Section titled “options”Returns
Section titled “Returns”Throws
Section titled “Throws”INVALID_SAMPLE when values is empty or holds a non-finite value;
INVALID_PARAMETER when bins is not a positive integer or edges are not at least 2 finite, strictly increasing
numbers.