title: numpy.savetxt resulting a formatting mismatch error in python 3.5
body: <p>I'm trying to save a numpy matrix (Nx3, float64) into a txt file using numpy.savetxt:</p>
  
  <pre><code>np.savetxt(f, mat, fmt='%.5f', delimiter=' ')
  </code></pre>
  
  <p>This line worked in python 2.7, but in python 3.5, I'm getting the following error:</p>
  
  <blockquote>
    <p>TypeError: Mismatch between array dtype ('float64') and format
    specifier ('%.5f %.5f %.5f')</p>
  </blockquote>
  
  <p>When I'm stepping into the savetxt code, the print the error (traceback.format_exc()) in the catch block (numpy.lib.npyio, line 1158), the error is completely different:</p>
  
  <blockquote>
    <p>TypeError: write() argument must be str, not bytes</p>
  </blockquote>
  
  <p>The line of code resulting the exception is the following:</p>
  
  <pre><code>fh.write(asbytes(format % tuple(row) + newline))
  </code></pre>
  
  <p>I tried to remove the asbytes, and it seems to fix this error. Is it a bug in numpy? </p>