直接用.shape可以快速读取矩阵的形状,使用shape[0]读取矩阵第一维度的长度. >>> import numpy as np >>> a = np.array([[1, 2, 3], [4, 5, 6], [7, ...
確定! 回上一頁