Re: [Numpy-discussion] Problem writing array with savetxt (python3.5)

2015-12-26 Thread Julian Taylor
hi unfortunately numpy text io in python3 is very broken and best avoided. Technically you might be able to work around it by opening the file in binary mode but that is the wrong way of doing it and might break when we finally get around to really fixing it, also won't work for unicode and string

[Numpy-discussion] Problem writing array with savetxt (python3.5)

2015-12-26 Thread Maxim Mayzel
Dear all, I’m having a problem writing an array with np.savetxt, see below. (python3.5, numpy 1.10.1) import numpy as np a=np.ones(5,dtype=int) np.savetxt('t.txt',a) Works fine, but the content of ’t.txt’ is overwritten. But, passing file handle gives an error, while it works fine on python2.7