Trait RankAxisExt

Source
pub trait RankAxisExt<A, S, D>
where S: Data<Elem = A>,
{ // Required methods fn rank_axis(&self, axis: Axis, method: RankMethod) -> Array<usize, D>; fn discretize_axis( &self, axis: Axis, method: RankMethod, buckets: usize, ) -> Array<usize, D>; }

Required Methods§

Source

fn rank_axis(&self, axis: Axis, method: RankMethod) -> Array<usize, D>

Returns an array of the same size as the original, where each value is replaced with a rank across all values sharing that element’s position along the given axis. For example, in a 2d matrix, setting Axis(0) will rank elements within rows.

Source

fn discretize_axis( &self, axis: Axis, method: RankMethod, buckets: usize, ) -> Array<usize, D>

Returns an array of the same size as the original, where each value is replaced with a bucket across all values sharing that element’s position along the given axis. For example, in a 2d matrix, setting Axis(0) will bucket elements within rows.

Implementations on Foreign Types§

Source§

impl<A, S, D> RankAxisExt<A, S, D> for ArrayBase<S, D>
where A: PartialOrd + Default, S: Data<Elem = A>, D: Dimension + RemoveAxis, <D as Dimension>::Pattern: NdIndex<D>, <D as Dimension>::Smaller: Dimension, <<D as Dimension>::Smaller as Dimension>::Pattern: NdIndex<<D as Dimension>::Smaller>,

Source§

fn rank_axis(&self, axis: Axis, method: RankMethod) -> Array<usize, D>

Source§

fn discretize_axis( &self, axis: Axis, method: RankMethod, buckets: usize, ) -> Array<usize, D>

Implementors§