Implementing an efficient rolling average algorithm with stride tricks