pub enum Indexer<D: Device> {
Select(usize),
SelectD(D),
Slice(Slice),
Boolean(Tensor<D, Bool>),
}Expand description
One element of a fancy-indexing operation.
Variants§
Select(usize)
Select a single index (removes the dimension).
SelectD(D)
Select via a signed dimension index (removes the dimension).
Slice(Slice)
Slice a range (keeps the dimension).
Boolean(Tensor<D, Bool>)
Boolean mask filtering (keeps the dimension).
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for Indexer<D>
impl<D> RefUnwindSafe for Indexer<D>
impl<D> Send for Indexer<D>
impl<D> Sync for Indexer<D>
impl<D> Unpin for Indexer<D>
impl<D> UnsafeUnpin for Indexer<D>
impl<D> UnwindSafe for Indexer<D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more