title: Python savetxt write as int
body: <p>I am trying to write an array out to a text file and I want each element to be written as an <code>int</code> type.</p>
  
  <p>I am using </p>
  
  <pre><code>np.savetxt(outfile_name, array, comments = '')
  </code></pre>
  
  <p>to write out the file. I converted <code>array</code> from <code>float</code> to <code>int</code> using </p>
  
  <pre><code>array = array.astype(int)
  </code></pre>
  
  <p>When I printed <code>array</code> in the program, the array came out as <code>int</code>, but when I wrote it to a text file, the file looks like:</p>
  
  <pre><code>0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
  1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
  1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00
  1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
  1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00
  </code></pre>