add scatter-add to support multiple integer arrays
Conflicts:
cupy/core/core.pyx
@@ -2415,12 +2415,11 @@ cpdef _scatter_op_multiple(ndarray a, list slices, v, op):
cdef ndarray a_interm, reduced_idx
cdef int li, ri
- if op != 'update':
- raise TypeError('scatter_op_multiple does not support op other than'
- 'update yet')
-
a_interm, reduced_idx, li, ri =\
_prepare_multiple_array_indexing(a, slices)
+ if op == 'update':
+ _scatter_op_single(a_interm, reduced_idx, v, li=li, ri=ri, op=op)
+ elif op == 'add':
_scatter_op_single(a_interm, reduced_idx, v, li=li, ri=ri, op=op)
