点击运行
import numpy as np a = np.arange(24) print(a.ndim) # 查看 a 的维数 b = a.reshape(2,4,3) print (b) print (b.ndim) # 查看 b 的维数
运行结果 :
正在执行...