Python Rolling Average Function Matlab