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§
Sourcefn rank_axis(&self, axis: Axis, method: RankMethod) -> Array<usize, D>
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.
Sourcefn discretize_axis(
&self,
axis: Axis,
method: RankMethod,
buckets: usize,
) -> Array<usize, D>
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.