I have a raster file in numpy array of size 4x9000x10000. The raster file has 4 bands - Red, Green, Blue, NIR and 6 different crop types.
I want to create small arrays of size, say 4x100x100 such that all pixels in the small array belong to the same crop type.
I tried to select a random point from the big array and read 100 pixels around the random point, but it doesnt guarantee that all pixels are going to be of same crop type.
Can you please help me how to do the split