Skip to main content

scatter

Function scatter 

Source
pub fn scatter<T: Copy>(
    x: &[T],
    shape: &[usize],
    indices: &[i64],
    indices_shape: &[usize],
    updates: &[T],
    updates_shape: &[usize],
    d: &ScatterDims,
    mode: GatherScatterMode,
    combine: Option<&dyn Fn(T, T) -> T>,
) -> Vec<T>
Expand description

scatter: combines updates into x with combine(old, update) (or replaces when combine is None), in row-major order of the updates. With Clip, start indices are clamped; otherwise windows that are not entirely in bounds are skipped, as XLA does.