pub fn mean<T, D>(
array: &ArrayView<'_, T, D>,
axis: Option<Axis>,
) -> Result<Array<T, Ix1>, &'static str>Expand description
Calculate the mean of array elements
§Errors
Returns an error if the array is empty or if conversion fails.
§Panics
Panics if type conversion from usize fails.
§Arguments
array- The input arrayaxis- Optional axis along which to compute the mean (None for global mean)
§Returns
The mean of the array elements