📅  最后修改于: 2022-03-11 14:46:37.176000             🧑  作者: Mango
>>> x = np.ma.array(np.arange(9).reshape(3, 3), mask=[[1, 0, 0],
[1, 0, 0],
[0, 0, 0]])
>>> x.filled(123)
array([[123, 1, 2],
[123, 4, 5],
[ 6, 7, 8]])