Replace values in masked numpy array not working
<p>I have the foll. masked array in numpy called arr with shape (50, 360, 720):</p>

<pre><code>masked_array(data =
 [[-- -- -- ..., -- -- --]
 [-- -- -- ..., -- -- --]
 [-- -- -- ..., -- -- --]
 ..., 
 [-- -- -- ..., -- -- --]
 [-- -- -- ..., -- -- --]
 [-- -- -- ..., -- -- --]],
             mask =
 [[ True  True  True ...,  True  True  True]
 [ True  True  True ...,  True  True  True]
 [ True  True  True ...,  True  True  True]
 ..., 
 [ True  True  True ...,  True  True  True]
 [ True  True  True ...,  True  True  True]
 [ True  True  True ...,  True  True  True]],
       fill_value = 1e+20)
</code></pre>

<p>It has the foll. data in arr[0]:</p>

<pre><code>arr[0].data

array([[-999., -999., -999., ..., -999., -999., -999.],
       [-999., -999., -999., ..., -999., -999., -999.],
       [-999., -999., -999., ..., -999., -999., -999.],
       ..., 
       [-999., -999., -999., ..., -999., -999., -999.],
       [-999., -999., -999., ..., -999., -999., -999.],
       [-999., -999., -999., ..., -999., -999., -999.]])
</code></pre>

<p>-999. is the missing_value and I want to replace it by 0.0. I do this:</p>

<pre><code>arr[arr == -999.] = 0.0
</code></pre>

<p>However, arr remains the same even after this operation. How to fix this?</p>