I read the scipy docs for the function here : scipy.ndimage.uniform_filter1d. However, when I tried using it, I couldn't wrap around my head on it's working. I read the docs, ran the example over there in the Python Shell, used my own example but still no progress. For eg:
>>> from scipy.ndimage import uniform_filter1d
>>> uniform_filter1d([2, 8, 0, 4, 1, 9, 9, 0], size=3)
array([4, 3, 4, 1, 4, 6, 6, 3])
>>> uniform_filter1d([1, 2, 3, 4, 5, 6, 7, 8], size=3)
array([1, 2, 3, 4, 5, 6, 7, 7])
When I saw the output of the second array, it felt like the function retained most of the array's elements. However in the second example it felt like barring 4 & 1 all the other elements in the output array were completely new.
Thus I would like you to help me understand the working and the use of this function.