标签:函数 msu array 计算 bsp sum ... sum函数 nbsp
>>> a = np.array([[1,2,3], [4,5,6]])
>>> a
array([[1, 2, 3],
[4, 5, 6]])
>>> np.cumsum(a)
array([ 1, 3, 6, 10, 15, 21]) # 计算累加和,1=1,3=1+2,6=1+2+3....
标签:函数 msu array 计算 bsp sum ... sum函数 nbsp
原文地址:https://www.cnblogs.com/pjishu/p/10447188.html