tensor.scatter
Produces a copy of input data, and updates value to values specified by updates at specific index positions specified by indices.
Args
self
(@Tensor<T>
) - The input tensor.updates
(Tensor<T>
) - The updates tensor.indices
(Tensor<T>
) - Tensor of indices.axis
(Option<usize>
) - Axis to scatter on. Default: axis=0.reduction
(Option<usize>
) - Reduction operation. Default: reduction='none'.
Panics
Panics if index values are not within bounds [-s, s-1] along axis of size s.
Returns
A new Tensor<T>
.
Example
Last updated