I do not understand the behavior of this numpy.ma.max (min, mean, etc.)
import numpy as np
arr = np.ma.array([0,np.nan,1])
np.ma.max(arr)
-> nan
I thought this was supposed to return a value excluding nan‘s? The only way I can get a real value is
np.nanmax(np.asarray(arr))
Is this right, or am I using numpy.ma.max incorrectly?
You need to create the mask: