I have a numpy 2d array (image) with values >=0.0 but there are some indices with value 'nan'. When I try to plot this figure it looks like the below image. The 0 in the image array becomes black and nan becomes white.
Now I want to apply gaussian smoothing on this array such that the after smoothing when I try to plot smoothed array, the nan values from the previous array appears white only.