I want to append 2 more 2-d arrays ,each one with shape of (1, 777, 458) ,to an exisiting ndarray with the shape of (14, 777, 458).
I have tried to use np.dstack in order to do that:
np.dstack((arr_14,arr_1a,arr_1b))
But then I have gotten the error:
ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 14 and the array at index 1 has size 1
I found a way to "solve" it, by using np.stack and get each array:
all_data=np.stack((arr_14[0],arr_14[1],arr_14[2],arr_14[3],arr_14[4],arr_14[5],arr_14[6],arr_14[7], arr_14[8],arr_14[9],arr_14[10],arr_14[11],arr_14[12],arr_14[13],arr_1a[0],arr_1b[0]))
that worked, but I want to know if there is better way to do the dame things, without extracting each band of the image.