Can't seem to figure this one out. Very new to numpy.
I have a numpy array of shape
(200,1,1000,1000) which corresponds to (number of images, channel, x_of_image, y_of_image). So I have 200 images with 1 channel that are 1000x1000 pixels each.
I want to take each of the 200 images
(1,1000,1000), do a operation on the image portion
(1000,1000), and append/concatenate it to a brand new array.
new_array = np.array() for image in original_array: new_array = np.concatenate(new_array,original_array.operation())
New array would end up being the exact same shape as the original
(200,1,1000,1000) just with different images because of the operation performed.
How would I just do the operation on some percentage of the array, say 50%?
This would output an array of