Hello, can numpy.savetxt save an array of strings? I got the following arror when saving an array containing strings formatted from datetime objects: File "C:\Programme\pythonxy\python\lib\site-packages\numpy\lib\io.py", line 542, in savetxt fh.write(format % tuple(row) + '\n') TypeError: float argument required Thanks for any help & regards, Timmie
On Mon, Mar 2, 2009 at 04:26, Timmie <timmichelsen@gmx-topmail.de> wrote:
Hello, can numpy.savetxt save an array of strings?
You need to use fmt= argument to specify the format string(s). The default is %10.5f, so it only works for floats. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
participants (2)
-
Robert Kern
-
Timmie