title: how to Remove NaN from 2D numpy array with float values and type of result should be array?
body: <p>For example, if I have the 2D array(df_nump) as follows:</p>
  
  <pre><code>array([[0.78, 0.806, 0.837, 0.831, 0.813, 0.802, 0.792, 0.773, 0.769,
          0.72, 0.676, 0.606, 0.428, nan, nan, nan, nan, nan, nan, nan,
          nan, nan, nan, nan, nan, nan, nan, nan],
         [0.866, 0.911, 0.921, 0.923, 0.906, 0.893, 0.881, 0.86, 0.841,
          0.803, 0.782, 0.702, 0.602, nan, nan, nan, nan, nan, nan, nan,
          nan, nan, nan, nan, nan, nan, nan, nan]])
  </code></pre>
  
  <p>The desired result is</p>
  
  <pre><code>array([[0.78, 0.806, 0.837, 0.831, 0.813, 0.802, 0.792, 0.773, 0.769,
              0.72, 0.676, 0.606, 0.428],
             [0.866, 0.911, 0.921, 0.923, 0.906, 0.893, 0.881, 0.86, 0.841,
              0.803, 0.782, 0.702, 0.602,]])
  </code></pre>
  
  <p>How should I transform?</p>
  
  <p>I find using df_nump =[[i for i in row if ~np.isnan(i)] for row in df_nump] But typing the result is a list and i want array type 
  Thanks!</p>