摘要: >>> 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.... 阅读全文
posted @ 2019-02-27 21:37 Jary霸 阅读(458) 评论(0) 推荐(0) 编辑