Skip to main content

ptp

Function ptp 

Source
pub fn ptp<T, D>(
    a: &Array<T, D>,
    axis: Option<usize>,
) -> Result<Array<T, IxDyn>, FerrayError>
where T: Element + PartialOrd + Copy + Sub<Output = T>, D: Dimension,
Expand description

Range (peak-to-peak) of array elements over a given axis.

Returns max - min. Analogous to numpy.ptp(a, axis=...).

§Errors

Returns FerrayError::InvalidValue if the array is empty.