numpy.ndarray.shape 返回一个数组维度的元组. 比如 import numpy as np x = np.array([1, 2]) y = np.array([[1],[2]]) print x.shape print y.shape
確定! 回上一頁