pub trait TryIndexUpdateOp<Idx, Value> {
// Required method
fn try_index_update(
&self,
index: Idx,
update: Value,
mode: UpdateMode,
) -> Result<Array, IndexUpdateError>;
}Expand description
Trait for functional indexed updates.
The source is unchanged. Slice bounds clip to the source shape, negative strides are supported, and empty slices are no-ops. Updates broadcast to the selection and cast to the source dtype. Reduction modes combine duplicate advanced indices; replacement does not define which duplicate wins.
Required Methods§
Sourcefn try_index_update(
&self,
index: Idx,
update: Value,
mode: UpdateMode,
) -> Result<Array, IndexUpdateError>
fn try_index_update( &self, index: Idx, update: Value, mode: UpdateMode, ) -> Result<Array, IndexUpdateError>
Return a new array with update applied at index according to mode.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".