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.

Return

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

Note

source and indices must have the same rank

Note

In this version source and indicies must have the same shape

Parameters
  • a: The input expression

  • axis: The axis along which to index

  • indices: The indices to be scattered

  • source: Expression with values to scatter.