Is there a simple way to calculate the rolling mean over one axis in a 3D-array? Let's say I have an array with x,y and time axis and I want the rolling mean over the time axis for all x and y. For 1D-arrays I use pandas:
import pandas as pd
rolling_array = pd.Series(array).rolling(window=window).mean()
But this does not work for multidimensional data.
EDIT:
My array looks like this:
import numpy as np
array = np.random.rand(100,100,200)
And I want the rolling mean over axis = 2