I have a NumPy array with shape(370,275,210) and I want to re-shape it to (275,210,370). How would I achieve this in Python? 370 is the number of bands,275 is the number of rows
You can use np.moveaxis()
>>> a = np.zeros((370, 275, 210)) >>> a.shape (370, 275, 210) >>> a = np.moveaxis(a, 0, 2) >>> a.shape (275, 210, 370)