public histogram(bins as Long = 10l, bounds as Tuple<Double, Double> = null, density as Boolean = false, weights as NDArray<Double> = null, ignoreNaN as Boolean = false) as Tuple<NDArray<Double>, NDArray<Double>>
Histogram of all elements, flattened without copying the source. Uniform bins include their left edge; the last bin also includes its right edge. Cost O(N log bins), O(bins) additional storage; output is Double for weighted counts.
| Parameter | Description |
|---|---|
bins | Positive number of equal-width bins. |
bounds | Optional finite (minimum,maximum) with positive width; otherwise inferred. |
density | Normalize the integral, not the sum of heights, to one. |
weights | Optional finite Double weight per source element, same shape. |
ignoreNaN | Skip NaN observations/weights, otherwise raise ValueException. |
Tuple of 1D counts/densities and independent bin-edge array.
counts, edges = data.histogram(bins=20l)