title: Save float and int to file simultaneously in Python
body: <p>I have a numpy array with a few columns, containing floats, and I want to add one more columns, containing only zeros and save this to file. For the program I need to use this file for, the last column should appear as 0 instead of 0.00000e+00. I tired this:</p>
  <pre><code>z = np.zeros(len(data[:,0])).astype(int)
  new_data = np.column_stack((data,z))
  np.savetxt(&quot;data_new.dat&quot;,new_data)
  </code></pre>
  <p>but it doesn't seem to work i.e. the zeros appear as floats. One more thing, how can I also specify the number of decimals that the floats should be saved with to the file? Thank you!</p>