<span style="font-family: Arial; font-size: 13px;">Hi,<br><br>I have 2D array, let's say: `np.random.random((100,100))` and I want to do simple manipulation on each point neighbors, like divide their values by 3.<br><br>So for each array value, x, and it neighbors n:<br><br><span style="font-family: courier new,monospace;">n n n    n/3 n/3 n/3<br>n x n -> n/3  x  n/3<br>n n n    n/3 n/3 n/3<br></span><br>I searched a bit, and found about scipy ndimage filters, but if I'm not wrong, there is no such function. Of course me being wrong is quite possible, as I did not comprehend whole ndimage module, but I tried generic filter for example and browser other functions.<br><br>Is there better way to make above manipulation, instead using for loop over every array element?<br><br><br>TIA</span>