Dear stackoverflow community, i need your help as i am looking for solution to my problem.
I am trying to spatially sum elements in a numpy array for classification purposes.
Say i have a 6x6 matrix as below: enter image description here
I would like my output as the sum of all elements that are in a specific spatial region in this example 3x3 region.
so the output should be something like this:enter image description here