NumPy 也提供了reshape函式來調整陣列大小。 import numpy as np. a = np.array([[1,2,3],[4,5,6]]). b = a.reshape(3,2). print b. 輸出如下:.
確定! 回上一頁