def seasonal_mean(x, freq):
 return np.array([pd_nanmean(x[i::freq]) for i in range(freq)])

def seasonal_mean ( x , freq ) : return np . array ( [ pd_nanmean ( x [ i : : freq ] ) for i in range ( freq ) ] )
return means for each period in x .