I have some rolling function which evaluates an array according to a function,
rolling(x, func, window=10) = [func(x[1+i:window+i+1]) for i in 0:(length(x)-window-1)]
for instance for the mean:
julia> using Statistics
julia> rolling(1:10,mean,5)
5-element Array{Float64,1}:
3.5
4.5
5.5
6.5
7.5
I wonder if there was an easy and fast and safe way to parallelize this function?