参考链接: Python len()
1、size
import numpy as np
X=np.array([[1,2,3,4],
[5,6,7,8],
...print("X_dim:",X_dim)
print(X.shape[0]) # 输出行的个数
print(X.shape[1]) #输出列的个数
<<
X_dim: (3, 4)
3
4
3、len...import numpy as np
X=np.array([[1,2,3,4],
[5,6,7,8],
[9,10,11,12]])
length=len