add test for multiple integer scatter_add
@@ -39,6 +39,21 @@ from cupy import testing
# broadcasting
{'shape': (3, 4, 5), 'slices': (slice(None), [[1, 2], [0, -1]],),
'value': numpy.arange(3 * 2 * 2 * 5).reshape(3, 2, 2, 5)},
+ # multiple integer arrays
+ {'shape': (2, 3, 4), 'slices': ([1, 0], [2, 1]),
+ 'value': numpy.arange(2 * 4).reshape(2, 4)},
+ {'shape': (2, 3, 4), 'slices': ([1, 0], slice(None), [2, 1]),
+ 'value': numpy.arange(2 * 3).reshape(2, 3)},
+ {'shape': (2, 3, 4), 'slices': ([1, 0], slice(None), [[2, 0], [3, 1]]),
+ 'value': numpy.arange(2 * 2 * 3).reshape(2, 2, 3)},
+ {'shape': (1, 1, 2, 3, 4),
+ 'slices': (None, slice(None), 0, [1, 0], slice(0, 2, 2), [2, -1]),
+ 'value': 1},
+ # multiple integer arrays duplicate
+ {'shape': (2, 3, 4), 'slices': ([1, 1], [1, 1]),
+ 'value': numpy.arange(2 * 4).reshape(2, 4)},
+ {'shape': (2, 3, 4), 'slices': ([1, 1], slice(None), [[2, 2], [3, 1]]),
+ 'value': numpy.arange(2 * 2 * 3).reshape(2, 2, 3)},
# mask
{'shape': (3, 4, 5),
'slices': (numpy.random.choice([False, True], (3, 4, 5)),),
