Function mean

Source
pub fn mean<I, T: Numeric>(data: I) -> T
where I: Iterator<Item = T>,
Expand description

Computes the mean of the values in an iterator, consuming the iterator.

This function does not perform Bessel’s correction

§Panics

If the iterator is empty. This function will also fail if the length of the iterator or sum of all the values in the iterator exceeds the maximum number the type can represent.