pub struct At { /* private fields */ }Expand description
A pending functional update made by Array::at.
Implementations§
Source§impl At
impl At
Sourcepub fn set(self, value: impl Into<ScalarOrArray>) -> Array
pub fn set(self, value: impl Into<ScalarOrArray>) -> Array
The array with the indexed region replaced by value (broadcast to the region and
cast to the array’s dtype; a weak Rust number is allowed), as MLX’s x[...] = v.
With repeated index-array positions, one of the values wins.
Sourcepub fn add(self, value: impl Into<ScalarOrArray>) -> Array
pub fn add(self, value: impl Into<ScalarOrArray>) -> Array
The array with value added to the indexed region; repeated index-array positions
accumulate (MLX’s x.at[...].add(v)).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for At
impl !UnwindSafe for At
impl Freeze for At
impl Send for At
impl Sync for At
impl Unpin for At
impl UnsafeUnpin for At
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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