I have an image with shape (1120,1472,4), am trying change this to (3000, 3000, 4) the code i have written is like this.
pad_shape = (3000, 3000)
i = np.array('test.tif')
result = np.zeros(pad_shape,dtype=int)
result[:i.shape[0], :i.shape[1]] = i
print(result)
It generates
ValueError: could not broadcast input array from shape (1120, 1472, 4) into shape (3000, 3000)