data = np.ma.masked_array(np.arange(10))
data[5] = np.ma.masked
data[data > 6] = np.ma.masked
init_data = np.arange(10)
data = np.ma.masked_array(init_data, mask=init_data > 6)
How do you deal with missing data using numpy/scipy?