title: How to check if two arrays are equal even if they contain NaN values in Julia?
body: <p>I am trying to compare two arrays. It just so happens that the data for the arrays contains <code>NaN</code> values and when you compare arrays with <code>NaN</code> values, the results are not what I would have expected. </p>
  
  <pre><code>julia&gt; a = [1,2, NaN]
  3-element Array{Float64,1}:
     1.0
     2.0
   NaN  
  
  julia&gt; b = [1,2, NaN]
  3-element Array{Float64,1}:
     1.0
     2.0
   NaN  
  
  julia&gt; a == b
  false
  </code></pre>
  
  <p>Is there an elegant way to ignore these <code>Nan</code>'s during comparison or replace them efficiently? </p>