import numpy.ma.mrecords as mrecords
data = np.ma.array(np.ma.zeros(30, dtype=[('date', '|O4'), ('price', '<f8')
    ]), mask=[(i < 10) for i in range(30)])
r = data.view(mrecords.mrecarray)
print(r.date[0])
How can I mask elements of a record array in Numpy?