How to calculate rolling / moving average using python + NumPy / SciPy?
There seems to be no function that simply calculates the moving average on numpy/scipy, leading to convoluted solutions.
There seems to be no function that simply calculates the moving average on numpy/scipy, leading to convoluted solutions.
I have a 2d numpy array. I want to take the average value of the n nearest entries to each entry, just like taking a sliding average over a one-dimensional array. What is the cleanest way to do this?