小马过_河

导航

2017年12月28日 #

numpy.array

摘要: 关于python中的二维数组,主要有list和numpy.array两种。 好吧,其实还有matrices,但它必须是2维的,而numpy arrays (ndarrays) 可以是多维的。 我们主要讨论list和numpy.array的区别: 我们可以通过以下的代码看出二者的区别 list对应的索 阅读全文

posted @ 2017-12-28 15:15 小马过_河 阅读(481) 评论(0) 推荐(0) 编辑

python.numpy.std()计算矩阵标准差

摘要: 1 >>> a = np.array([[1, 2], [3, 4]]) 2 >>> np.std(a) # 计算全局标准差 3 1.1180339887498949 4 >>> np.std(a, axis=0) # axis=0计算每一列的标准差 5 array([ 1., 1.]) 6 >>> np.std(a, axis=1) # 计算每一行的标准差 7 arr... 阅读全文

posted @ 2017-12-28 15:11 小马过_河 阅读(24818) 评论(0) 推荐(0) 编辑