Function information::hist::hist1d
source · [−]Expand description
Calculates the number of events of each integer bin for a one-dimensional integer array.
Usage
use ndarray::array;
use information::hist1d;
let arr = array![0, 1, 1, 1, 2, 2];
let hist = hist1d(&arr, 3).unwrap();
assert_eq!(hist, array![1, 3, 2]);