On 09/01/2009 09:55 AM, Tim Michelsen wrote:
>> But I completely agree with you, genfromtxt could print out
>> the line number and the actual line giving problems.
>>
> Here we go:
> http://projects.scipy.org/numpy/ticket/1212
>
>
>
>
> ___
> NumPy-
> But I completely agree with you, genfromtxt could print out
> the line number and the actual line giving problems.
Here we go:
http://projects.scipy.org/numpy/ticket/1212
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scip
import sys
f = open(sys.argv[1], 'rt')
for l in f:
if len(l.split('|')) != 12:
print(l)
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
> $ awk -F '|' '{if(NF != 12) print NR;}' /tmp/pp.txt
> and besides the first 23 lines and the last 3 lines of the file,
> also the following have a number of '|' different from 11:
> 1635
> 2851
> 5538
> i.e. BIKIN, BENGUERIR and TERESINA AIRPORT.
Looks lika some bash magic.
I will try to transla
I have tried
$ awk -F '|' '{if(NF != 12) print NR;}' /tmp/pp.txt
and besides the first 23 lines and the last 3 lines of the file,
also the following have a number of '|' different from 11:
1635
2851
5538
i.e. BIKIN, BENGUERIR and TERESINA AIRPORT.
But I completely agree with you, genfromtxt could p
> Mmh, perhaps.
Thanks for the quick reply.
> I'll try to see what I can do. Usually, this message
> shows up when one of the lines you have read doesn't have the same
> number of columns as the others.
Could we add this error to the docstring?
As I suggested, It would be helpful to get the l
On Sep 1, 2009, at 6:08 AM, Tim Michelsen wrote:
> Hello,
> I tried to load a ASCII table into a string array. Unfortunately,
> this table has
> some empty chells
>
> Here it is:
> http://www.ncdc.noaa.gov/oa/climate/rcsg/cdrom/ismcs/alphanum.html
>
> After having converted this into a text fil
Hello,
I tried to load a ASCII table into a string array. Unfortunately, this table has
some empty chells
Here it is:
http://www.ncdc.noaa.gov/oa/climate/rcsg/cdrom/ismcs/alphanum.html
After having converted this into a text file I tried this:
$ np.genfromtxt('alphanum_to-text.txt', dtype=np.str