2008/10/2 Francesc Alted <[EMAIL PROTECTED]>: >> how can I load ASCII data if the file contains characters >> instead of floats > > You would need to specify the length of your strings. Try with > dtype="SN", where N is the expected length of the strings.
Other options include: - using converters to convert the character to a value: np.loadtxt('/tmp/bleh.dat', converters={2: lambda x: 0}) - Skipping the specified column: np.loadtxt('/tmp/bleh.dat', usecols=(0,1)) Cheers Stéfan _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion