[Numpy-discussion] loadtxt error

Joshua Lippai discerptor@gmail....
Wed Sep 24 01:36:54 CDT 2008


David said the bug was fixed in the trunk, which you don't have; the
development state of the main source code, or the trunk, is the latest
state available, and releases are always a bit behind trunk since it
would be kind of ridiculous to make a new release every time someone
commits a change. You can download the current NumPy source code via
subversion with

svn co http://svn.scipy.org/svn/numpy/trunk numpy

While the most recent release version number is 1.1.1, the trunk is at
something more along the lines of 1.3.0dev5861 at the moment. You can
check your numpy version from the Python shell by importing numpy and
then calling the __version__ function. So you would type:

     import numpy
     numpy.__version__

And the version would be displayed on screen. Bear in mind that unlike
the release, which installs via an installer file you double click,
you will have to compile numpy from the downloaded source code
yourself. Detailed instructions for doing this (and also installing
SciPy from source) are available here:

http://www.scipy.org/Installing_SciPy/Windows


Josh

On Tue, Sep 23, 2008 at 10:14 PM, frank wang <f.yw@hotmail.com> wrote:
> My numpy version is 1.1.1. I just downloaded and installed. It is the same
> result. Also, when I use the list, I got similar error said list does not
> have the find command.
>
> ---> 14
> fid=loadtxt(fname,comments='"',dtype='|S4',converters={cols:lambda s
> :int(s,16)},usecols=[cols])
>      15
>      16
> #fid=loadtxt('ww36_5adcoutputsin45mhznotuner-0dbm_mux_adc_ddc_rmR.cs
> v',comments='"',dtype='string',usecols=(0,))
> C:\Python25\lib\site-packages\numpy\lib\io.pyc in loadtxt(fname, dtype,
> comments
> , delimiter, converters, skiprows, usecols, unpack)
>     337     for i, conv in (user_converters or {}).iteritems():
>     338         if usecols:
> --> 339             i = usecols.find(i)
>     340         converters[i] = conv
>     341
> AttributeError: 'list' object has no attribute 'find'
>> c:\python25\lib\site-packages\numpy\lib\io.py(339)loadtxt()
>     338         if usecols:
> --> 339             i = usecols.find(i)
>     340         converters[i] = conv
>
>
> Thanks
>
> Frank
>
>> From: pgmdevlist@gmail.com
>> To: numpy-discussion@scipy.org
>> Date: Mon, 22 Sep 2008 20:10:11 -0400
>> Subject: Re: [Numpy-discussion] loadtxt error
>>
>> On Monday 22 September 2008 19:56:47 frank wang wrote:
>> > This error is caused that the usecols is a tuple and it does not have
>> > find
>> > command. I do not know how to fix this problem.
>>
>> Try to use a list instead of a tuple as a quick-fix.
>> Anyway, Frank, you should try to give us the version of numpy you're
>> using.
>> Obviously, it's not the latest.
>> _______________________________________________
>> Numpy-discussion mailing list
>> Numpy-discussion@scipy.org
>> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>
> ________________________________
> See how Windows connects the people, information, and fun that are part of
> your life. See Now
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>


More information about the Numpy-discussion mailing list