摘要: 1.基本使用 sum() 没有axis参数表示全部数据相加 axis=0,表示按列相加 axis=1,表示按行相加 from numpy import * a = array([[1, 2, 3], [4, 5, 6]]) print(a,'\n') b = sum(a) print(b,'\n') 阅读全文
posted @ 2022-02-04 18:00 nuoruo 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Numpy的 tile() 函数,就是将原矩阵横向、纵向地复制。tile 是瓷砖的意思,顾名思义,这个函数就是把数组像瓷砖一样铺展开来。 举个例子,原矩阵: mat = array([[1,2], [3, 4]]) 横向: tile(mat, (1, 4)) # 等同于 tile(mat, 4) i 阅读全文
posted @ 2022-02-04 17:46 nuoruo 阅读(63) 评论(0) 推荐(0) 编辑
摘要: scatter(x, y, s=None, c=None, marker=None, cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, verts=None, edgecolors=None, hold= 阅读全文
posted @ 2022-02-04 17:25 nuoruo 阅读(564) 评论(0) 推荐(1) 编辑