title: Write numpy unicode array to a text file
body: <p>I'm trying to export a numpy array that contains unicode elements to a text file.</p>
  
  <p>So far I got the following to work, but doesn't have any unicode character:</p>
  
  <pre><code>import numpy as np
  
  array_unicode=np.array([u'maca' u'banana',u'morango'])
  
  with open('array_unicode.txt','wb') as f:
      np.savetxt(f,array_unicode,fmt='%s')
  </code></pre>
  
  <p>If I change 'c' from 'maca' to 'ç' I get an error:</p>
  
  <pre><code>import numpy as np
  
  array_unicode=np.array([u'maça' u'banana',u'morango'])
  
  with open('array_unicode.txt','wb') as f:
      np.savetxt(f,array_unicode,fmt='%s')
  </code></pre>
  
  <p>Traceback:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;ipython-input-48-24ff7992bd4c&gt;", line 8, in &lt;module&gt;
      np.savetxt(f,array_unicode,fmt='%s')
    File "C:\Anaconda2\lib\site-packages\numpy\lib\npyio.py", line 1158, in savetxt
      fh.write(asbytes(format % tuple(row) + newline))
  UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in position 2: ordinal not in range(128)
  </code></pre>
  
  <p>How can I set <code>savetxt</code> from numpy to write unicode characters?</p>