1>>> x = np.ma.array(np.arange(9).reshape(3, 3), mask=[[1, 0, 0],
2 [1, 0, 0],
3 [0, 0, 0]])
4
5>>> x.filled(123)
6array([[123, 1, 2],
7 [123, 4, 5],
8 [ 6, 7, 8]])