Skip to main content

histogram

Function histogram 

Source
pub fn histogram(data: &[u32], n_bins: usize) -> Vec<u32>
Expand description

Compute a histogram of data into n_bins equal-width bins over \[min_val, max_val).

Values outside the range are clamped into the first or last bin. Returns a Vecu32of lengthn_bins`.

ยงPanics

Panics if n_bins == 0.