np.reshape增加一維的用法

舉例: 數組img img = np.reshape(img,img.shape+(1,)) 把1010的數組增加一維,變成10101的數組。 img = np.reshape(img,(1,)+img.shape) 把1010的數組增加一維,變成11010的數組。
相關文章
相關標籤/搜索