>>> import numpy as np
>>> np.add.accumulate([1,2,3]) # 累加
array([1, 3, 6], dtype=int32)
>>> np.add.accumulate...([1,2,3,4,5])
array([ 1, 3, 6, 10, 15], dtype=int32)
>>> np.add.reduce([1,2,3,4,5]) # 连加
15
>>> x =...np.array([1,2,3,4])
>>> np.add.at(x, [0,2], 3) # 下标0和2的元素分别加3
>>> x
array([4, 2, 6, 4])
>>> np.add.outer...)
array([[5, 6, 7], # 1+4, 1+5, 1+6
[6, 7, 8], # 2+4, 2+5, 2+6
[7, 8, 9]]) # 3+4, 3+5, 3+6
>>> np.add.outer...]]) # row1+row2+row3
>>> np.add.reduceat(x, [0, 3, 1, 2])
array([[ 12., 15., 18., 21.], # row0+row1