- cupy.put(a, ind, v, mode='wrap')[source]#
Replaces specified elements of an array with given values.
a (cupy.ndarray) – Target array.
ind (array-like) – Target indices, interpreted as integers.
v (array-like) – Values to place in a at target indices. If v is shorter than ind it will be repeated as necessary.
mode (str) – How out-of-bounds indices will behave. Its value must be either ‘raise’, ‘wrap’ or ‘clip’. Otherwise,
Default mode is set to ‘wrap’ to avoid unintended performance drop. If you need NumPy’s behavior, please pass mode=’raise’ manually.