numpy python mean code example Example: numpy mean >> import numpy as np >> a=[1,2,3,4,5] >> np.mean(a) 3.0