Using numpy 'mean' instead of sum/n