Re: [Numpy-discussion] Problem with loadtxt

2010-08-18 Thread Warren Weckesser
Scott MacDonald wrote: > Yes it should, sorry I must have copied and pasted wrong. > > I did some more research and found this bug report: > > http://projects.scipy.org/numpy/ticket/1163 > > I guess this is still open? I am using numpy 1.4.1 > > According to that ticket, it is doing int(float(x))

Re: [Numpy-discussion] Problem with loadtxt

2010-08-18 Thread Scott MacDonald
Yes it should, sorry I must have copied and pasted wrong. I did some more research and found this bug report: http://projects.scipy.org/numpy/ticket/1163 I guess this is still open? I am using numpy 1.4.1 On Wed, Aug 18, 2010 at 2:42 PM, Friedrich Romstedt < friedrichromst...@gmail.com> wrot

Re: [Numpy-discussion] Problem with loadtxt

2010-08-18 Thread Friedrich Romstedt
2010/8/18 Scott MacDonald : > In [42]: c = StringIO("5399354557888517120") Well, should't it be StringIO("5399354557888517312")? Maybe I'm missing sth. Friedrich ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman

Re: [Numpy-discussion] Problem with loadtxt

2010-08-17 Thread Scott MacDonald
Thanks Warren, that does solve the problem. I am still confused however by this: In [42]: c = StringIO("5399354557888517120") In [43]: np.loadtxt(c, dtype=np.uint64) Out[43]: array(5399354557888517120L, dtype=uint64) Does the above seem contradictory to you? Thanks, Scott On Tue, Aug 17, 2010

Re: [Numpy-discussion] Problem with loadtxt

2010-08-17 Thread Warren Weckesser
Scott MacDonald wrote: > Hi, > > I have a text file called 'blah' that contains only the following line: > > 5399354557888517312,5399354557888517312 > > I want to load these into a numpy array as unit64's. The following > script demonstrates my problem: > > import numpy as np > > with open('blah'

[Numpy-discussion] Problem with loadtxt

2010-08-17 Thread Scott MacDonald
Hi, I have a text file called 'blah' that contains only the following line: 5399354557888517312,5399354557888517312 I want to load these into a numpy array as unit64's. The following script demonstrates my problem: import numpy as np with open('blah', 'r') as f: x = np.loadtxt(f, delimite