Function marian::scatter

Function Documentation

Expr marian::scatter(Expr a, int axis, Expr indices, Expr source)

Scatter elements from source along an axis into a.

Unindexed elements from a remain unchanged. This is the reverse operation to gather.


Scattered expression with the same shape as a now containing values from source in positions indices


source and indices must have the same rank


In this version source and indicies must have the same shape

  • a: The input expression

  • axis: The axis along which to index

  • indices: The indices to be scattered

  • source: Expression with values to scatter.