[3 Printing Arrays]NumPy

当你print数组的时候, NumPy遵循下面的规则:

1.the last axis is printed from left to right,

2.the second-to-last is printed from top to bottom,

3.the rest are also printed from top to bottom, with each slice separated from the next by an empty line.

一维数组以行的形式展现,二维的会以行和列展现,三维的最后一个axis是以行的形式,另外都是从上到下的形式


可以通过下面这个例子获得更加直观的感受,当然,如果你想要强行让他展现全部的数字,可以用这个语句(👇):

>>>np.set_printoptions(threshold='nan')

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容