Trait NDArrayReduce

Source
pub trait NDArrayReduce: NDArray + Debug {
    type Output: Access<Self::DType>;

    // Required methods
    fn max(
        self,
        axes: Axes,
        keepdims: bool,
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn min(
        self,
        axes: Axes,
        keepdims: bool,
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn product(
        self,
        axes: Axes,
        keepdims: bool,
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
    fn sum(
        self,
        axes: Axes,
        keepdims: bool,
    ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>;
}
Expand description

Axis-wise array reduce operations

Required Associated Types§

Required Methods§

Source

fn max( self, axes: Axes, keepdims: bool, ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>

Construct a max-reduce operation over the given axes.

Source

fn min( self, axes: Axes, keepdims: bool, ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>

Construct a min-reduce operation over the given axes.

Source

fn product( self, axes: Axes, keepdims: bool, ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>

Construct a product-reduce operation over the given axes.

Source

fn sum( self, axes: Axes, keepdims: bool, ) -> Result<Array<Self::DType, Self::Output, Self::Platform>, Error>

Construct a sum-reduce operation over the given axes.

Implementors§