To stack the array into shape (n_image, width, height), you need np.dstack. Check out https://numpy.org/doc/stable/reference/generated/numpy.dstack.html For 3 bands image e.g RGB you get shape (3,width,height). Note: width and height must be equal in all arrays.