Trait ha_ndarray::NDArrayTransform
source · pub trait NDArrayTransform: NDArray + Sized + Debug {
type Broadcast: Access<Self::DType>;
type Slice: Access<Self::DType>;
type Transpose: Access<Self::DType>;
// Required methods
fn broadcast(
self,
shape: Shape
) -> Result<Array<Self::DType, Self::Broadcast, Self::Platform>, Error>;
fn reshape(self, shape: Shape) -> Result<Self, Error>;
fn slice(
self,
range: Range
) -> Result<Array<Self::DType, Self::Slice, Self::Platform>, Error>;
fn squeeze(self, axes: Axes) -> Result<Self, Error>;
fn unsqueeze(self, axes: Axes) -> Result<Self, Error>;
fn transpose(
self,
permutation: Option<Axes>
) -> Result<Array<Self::DType, Self::Transpose, Self::Platform>, Error>;
}
Expand description
Array transform operations
Required Associated Types§
Required Methods§
sourcefn broadcast(
self,
shape: Shape
) -> Result<Array<Self::DType, Self::Broadcast, Self::Platform>, Error>
fn broadcast( self, shape: Shape ) -> Result<Array<Self::DType, Self::Broadcast, Self::Platform>, Error>
Broadcast this array into the given shape
.
sourcefn slice(
self,
range: Range
) -> Result<Array<Self::DType, Self::Slice, Self::Platform>, Error>
fn slice( self, range: Range ) -> Result<Array<Self::DType, Self::Slice, Self::Platform>, Error>
Construct a slice of this array.
Object Safety§
This trait is not object safe.