scatter_nd(indices, updates, shape, reduction='sum', dev_str=None, f=None)¶
Scatter updates into a new array according to indices.
indices (array) – Indices for the new values to occupy.
updates (array) – Values for the new array to hold.
shape (sequence of ints) – The shape of the result.
reduction (str) – The reduction method for the scatter, one of ‘sum’, ‘min’ or ‘max’
dev_str (str, optional) – device on which to create the array ‘cuda:0’, ‘cuda:1’, ‘cpu’ etc. Same as updates if None.
f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.
New array of given shape, with the values scattered at the indices.