← Back

Module reductions

fn sum[T; const N: u32](self: &NDArray[T; N]) -> T

Sum of all elements.

Source: reductions.joule:17

fn prod[T; const N: u32](self: &NDArray[T; N]) -> T

Product of all elements.

Source: reductions.joule:22

fn min[T; const N: u32](self: &NDArray[T; N]) -> T

Minimum element value.

Source: reductions.joule:27

fn max[T; const N: u32](self: &NDArray[T; N]) -> T

Maximum element value.

Source: reductions.joule:32

fn mean[T; const N: u32](self: &NDArray[T; N]) -> T

Arithmetic mean of all elements.

Source: reductions.joule:38

fn argmin[T; const N: u32](self: &NDArray[T; N]) -> usize

Index of the minimum element (flat index into data).

Source: reductions.joule:47

fn argmax[T; const N: u32](self: &NDArray[T; N]) -> usize

Index of the maximum element (flat index into data).

Source: reductions.joule:52

fn any[T; const N: u32](self: &NDArray[T; N]) -> bool

True if any element is nonzero.

Source: reductions.joule:61

fn all[T; const N: u32](self: &NDArray[T; N]) -> bool

True if all elements are nonzero.

Source: reductions.joule:66