[Numpy-discussion] Using loadtxt() twice on same file freezes python
Sander de Kievit
Thu Mar 26 15:24:30 CDT 2009
David Cournapeau wrote:
> On Fri, Mar 27, 2009 at 1:14 AM, Sander de Kievit
> <email@example.com> wrote:
>> On my PC the following code freezes python:
>> import numpy as np
>> from StringIO import StringIO
>> c = StringIO("0 1\n2 3")
>> Is this intentional behaviour or should I report this as a bug?
> Which version of numpy are you using (numpy.version.version), on which OS ?
The specifics for my platform:
Fedora release 10 (Cambridge)
kernel: 22.214.171.124-170.2.35.fc10.i686 #1 SMP
Also, if I close the file in between the two calls it works without
problem (if I use a real file, that is).
> That's a most definitly not expected behavior (you should get an
> exception the second time because the "stream" is empty - which is
> exactly what happens on my installation, but your problem may be
> platform specific).
Thanks for the quick replies! I'll report the bug.
More information about the Numpy-discussion