>>> import numpy as np
>>> np.add.accumulate([1,2,3]) # 累加
array([1, 3, 6], dtype=int32)
>>> np.add.accumulate...> 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的元素分别加...]]) # row3
>>> np.add.reduceat(x, [0, 3, 1, 3], axis=1) # 对列进行计算
array([[ 3., 3., 3., 3.],