title: Writing Numpy Array with NaNs into CSV in python
body: <p>I am trying to write 2D <code>numpy array</code> into csv file using <code>np.savetxt</code>.</p>
  
  <pre><code>import numpy as np
  
  data = np.array([[0,np.nan,2,3],[4,5,np.nan,7],[8,9,10,np.nan]])
  
  np.savetxt("file.csv", data, delimiter=",", fmt='%.2f')
  </code></pre>
  
  <p>Which creates a file <code>file.csv</code> with the following content.</p>
  
  <pre><code>0.00,nan,2.00,3.00
  4.00,5.00,nan,7.00
  8.00,9.00,10.00,nan
  </code></pre>
  
  <p>As you can see the file contains <code>nan</code> instead of blanks. I know nan is not a string.</p>
  
  <p><strong>Expected Output:</strong></p>
  
  <pre><code>0.00,,2.00,3.00
  4.00,5.00,,7.00
  8.00,9.00,10.00,
  </code></pre>
  
  <p>Using <code>pandas</code> I can achieve this like below.</p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame(data)
  df.to_csv("file1.csv", index=False)
  </code></pre>
  
  <p>But I'm refraining from using <code>pandas</code> for now. So is it possible to achieve this using <code>numpy</code>?</p>