def staticMovingAverage(arr, fineness=<NUM_LIT:10>):
s0 = arr.shape[<NUM_LIT:0>]<EOL>window_len = int(round(s0 / fineness))<EOL>start = arr[<NUM_LIT:0>] + arr[<NUM_LIT:0>] - arr[window_len - <NUM_LIT:1>:<NUM_LIT:0>:-<NUM_LIT:1>]<EOL>end = arr[-<NUM_LIT:1>] + arr[-<NUM_LIT:1>] - arr[-<NUM_LIT:1>:-window_len:-<NUM_LIT:1>]<EOL>s = np.r_[start, arr, end]<EOL>w = np.ones(window_len, '<STR_LIT:d>')<EOL>w /= w.sum()<EOL>a0 = np.convolve(w, s, mode='<STR_LIT>')[:s0]<EOL>a1 = np.convolve(w, s[::-<NUM_LIT:1>], mode='<STR_LIT>')[:s0][::-<NUM_LIT:1>]<EOL>return <NUM_LIT:0.5> * (a0 + a1)<EOL>
smooth [arr] using moving average