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