Trait ndarray::SliceArg

source ·
pub unsafe trait SliceArg<D: Dimension>: AsRef<[SliceInfoElem]> {
    type OutDim: Dimension;

    fn in_ndim(&self) -> usize;
    fn out_ndim(&self) -> usize;
}
Expand description

A type that can slice an array of dimension D.

This trait is unsafe to implement because the implementation must ensure that D, Self::OutDim, self.in_dim(), and self.out_ndim() are consistent with the &[SliceInfoElem] returned by self.as_ref() and that self.as_ref() always returns the same value when called multiple times.

Required Associated Types§

Dimensionality of the output array.

Required Methods§

Returns the number of axes in the input array.

Returns the number of axes in the output array.

Implementations on Foreign Types§

Implementors§