import numpy as np
a=np.array([[1,2,3,4],[1,2,3,4]])
print(a.shape[0])
#2
print(a.shape[1])
#4
numpy的shape获取矩阵的维度
猜你喜欢
转载自blog.csdn.net/weixin_45631815/article/details/109116294
今日推荐
周排行