Np.mean() versus np.average() in Python NumPy?
In certain versions of NumPy there is another significant contrast that you should know:
normal doesn't consider masks, so register the normal over the entire arrangement of data.
mean considers account masks, so register the mean just unmasked qualities.
g = [1,2,3,55,66,77]
f = np.ma.masked_greater(g,5)
np.average(f)
Out: 34.0
np.mean(f)
Out: 2.0