delete 'average' function and replace to 'numpy.mean'