numpy的shape获取矩阵的维度 金融小白数据分析之路 2022-09-05 74 阅读1分钟 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