pub trait Reduce1Axis<T: CountElements, R: CountElements, const I: isize>: AllocateZeros + ForEachBroadcast1<R, T, I> {
    fn reduce_into<F>(inp: &T, out: &mut R, f: F)
    where
        F: Copy + FnMut(T::Dtype, T::Dtype) -> T::Dtype
; fn reduce<F>(inp: &T, f: F) -> Box<R>
    where
        F: Copy + FnMut(T::Dtype, T::Dtype) -> T::Dtype
, { ... } }
Expand description

Reduce the Ith axis of T. For example given T of shape (M, N, O), you can reduce:

  1. the 0th axis (M) to give a shape of (N, O)
  2. the 1st axis (N) to give a shape of (M, O)
  3. the 2nd axis (O) to give a shape of (M, N)

Required Methods

Provided Methods

Implementors