Warning
This page was created from a pull request.
jax.lax.scatterΒΆ
-
jax.lax.
scatter
(operand, scatter_indices, updates, dimension_numbers, *, indices_are_sorted=False, unique_indices=False)[source]ΒΆ Scatter-update operator.
Wraps XLAβs Scatter operator, where updates replace values from operand.
If multiple updates are performed to the same index of operand, they may be applied in any order.
The semantics of scatter are complicated and its API is subject to change.
- Parameters
operand (
Any
) β an array to which the scatter should be appliedscatter_indices (
Any
) β an array that gives the indices in operand to which each update in updates should be applied.updates (
Any
) β the updates that should be scattered onto operand.dimension_numbers (
ScatterDimensionNumbers
) β a lax.ScatterDimensionNumbers object that describes how dimensions of operand, start_indices, updates and the output relate.indices_are_sorted (
bool
) β whether scatter_indices is known to be sorted. If true, may improve performance on some backends.unique_indices (
bool
) β whether the indices to be updated inoperand
are guaranteed to not overlap with each other. If true, may improve performance on some backends.
- Return type
- Returns
An array containing the sum of operand and the scattered updates.