I have used reduceRegion using reducer: ee.Reducer.toList() to create a list of NDVI pixel values of a certain image.
I wish to use these values to input them into a CNN for regression.
When I try to transform the list to an image, I am not sure about the shape that I need to reshape the list into.
For example - I have a region that yields 247 pixels when I reduce the image to a list (scale: 10). That does not allow me to make it a 14X14 image or 15X15 image so I can use it as input to the CNN (as a np.array(15,15)).
How can I transform back into an array?
Also - what is the method used by the reducer?
Is it going row-by-row of the image or "snake-figure"? That matters to me because if it is row-by-row than at some points in the list, two pixels that are next to each other are actually the end of one row and the start of the next one and thus I cannot use the relationship between them.