I have two arrays with same dimension and shape. this nv_arr array has null values (-9999). I've created a masked array nv_mask to mask all values besides -9999 to somehow "update" this out array by the position, without the need to create a new array.
In other words, numbers 0, 3, 6 and 2 must be replaced by -9999. How can I do that?
>>> nv_arr
([[-9999, 123, -9999],
[-9999, 444, 444],
[-9999, 323, 323]])
>>> nv_mask
[[-9999 -- -9999]
[-9999 -- --]
[-9999 -- --]]
>>> out
([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])