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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.