摘要: import numpy as np # 初始化二维数组 a = np.random.randn(4, 3) # 数组普通相加,默认 axis=0 b = np.sum(a) # 按行相加,不保持其二维特性 c = np.sum(a, axis=1) # 按行相加,并且保持其二维特性 d = np. 阅读全文
posted @ 2020-09-22 10:38 yx啦啦啦 阅读(2130) 评论(0) 推荐(0) 编辑
……