A Thursday 02 October 2008, Nils Wagner escrigué:
> Hi all,
>
> how can I load ASCII data if the file contains characters
> instead of floats
>
> Traceback (most recent call last):
>    File "test_csv.py", line 2, in <module>
>      A = loadtxt('ca6_sets.csv',dtype=char ,delimiter=';')
> NameError: name 'char' is not defined

You would need to specify the length of your strings.  Try with 
dtype="SN", where N is the expected length of the strings.

Cheers,

-- 
Francesc Alted
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to