<s> """<STR_LIT>""" <EOL> import numpy as np <EOL> from numba import guvectorize <EOL> @ guvectorize ( [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def move_mean ( a , window_arr , out ) : <EOL> window_width = window_arr [ <NUM_LIT:0> ] <EOL> asum = <NUM_LIT:0.0> <EOL> count = <NUM_LIT:0> <EOL> for i in range ( window_width ) : <EOL> asum += a [ i ] <EOL> count += <NUM_LIT:1> <EOL> out [ i ] = asum / count <EOL> for i in range ( window_width , len ( a ) ) : <EOL> asum += a [ i ] - a [ i - window_width ] <EOL> out [ i ] = asum / count <EOL> arr = np . arange ( <NUM_LIT:20> , dtype = np . float64 ) . reshape ( <NUM_LIT:2> , <NUM_LIT:10> ) <EOL> print ( arr ) <EOL> print ( move_mean ( arr , <NUM_LIT:3> ) ) </s>
