[Numpy-discussion] numpy.savetxt to string?

Warren Weckesser warren.weckesser at gmail.com
Wed Nov 6 13:23:14 EST 2013


Which version of numpy are you using?  I just tried it with 1.7.1, and it
accepted a StringIO instance.  The docstring says the first argument may be
a filename or file handle (
http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html#numpy.savetxt
).

Warren




On Wed, Nov 6, 2013 at 1:17 PM, Neal Becker <ndbecker2 at gmail.com> wrote:

> According to doc, savetxt only allows a file name.  I'm surprised it
> doesn't
> allow a file-like object.  How can I format text into a string?  I would
> like
> savetxt to accept StringIO for this.
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131106/f143cbd1/attachment.html>


More information about the NumPy-Discussion mailing list