numpy记事本,关于numpy使用过程中遇到的这种问题及经验 import numpy as np a=np.zeros((4,5)) print(a) print(a.shape) print(a.shape[0]) print(a.shape[1]) 由于a是一个矩阵,a,shape返回的是一个序列,(4, 5),它是可索引可迭代的,因此可以用索引表示出来,即a.shape[1],其值为5