2017-04-04 40 views

回答

1

您可以使用np.moveaxis()

>>> a = np.zeros((370, 275, 210)) 
>>> a.shape 
(370, 275, 210) 
>>> a = np.moveaxis(a, 0, 2) 
>>> a.shape 
(275, 210, 370) 
1

其實,我想你需要換軸0與2

np.swapaxes(x, 0, 2) 

這可能是一個高光譜圖像?

+0

是的,這是高光譜圖像。 –

+0

好吧,我也一直在研究高光譜圖像。我可以建議你(http://www.spectralpython.net/)python模塊 – Ibrahim

+0

@易卜拉欣 - 我使用的是同一個。 –

相關問題