[Numpy-discussion] Using loadtxt() twice on same file freezes python

Pauli Virtanen pav at iki.fi
Thu Mar 26 17:02:28 EDT 2009


Thu, 26 Mar 2009 21:24:30 +0100, Sander de Kievit wrote:
> David Cournapeau wrote:
>> On Fri, Mar 27, 2009 at 1:14 AM, Sander de Kievit
>> <dekievit at strw.leidenuniv.nl> wrote:
>>> On my PC the following code freezes python:
>>>
>>> [code]
>>> import numpy as np
>>> from StringIO import StringIO
>>> c = StringIO("0 1\n2 3")
>>> np.loadtxt(c)
>>> np.loadtxt(c)
>>> [/code]
>>>
>>> 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: 2.6.27.19-170.2.35.fc10.i686 #1 SMP python: 2.5.2
> numpy: 1.2.0
> 
> Also, if I close the file in between the two calls it works without
> problem (if I use a real file, that is).

Could you test this with Numpy SVN version (or the 1.3 beta).

It's very likely the bug is this one:

	http://projects.scipy.org/numpy/ticket/908

and it has already been fixed.

-- 
Pauli Virtanen




More information about the NumPy-Discussion mailing list