Re: numpy.genfromtxt with Python3 - howto

2012-04-06 Thread Marc Christiansen
Helmut Jarausch wrote: > I have a machine with a non-UTF8 local. > I can't figure out how to make numpy.genfromtxt work [...] > #!/usr/bin/python3 > import numpy as np > import io > import sys > > inpstream = io.open(sys.stdin.fileno(), "r", encoding='latin1') > > data = np.genfromtxt(inpstream)

numpy.genfromtxt with Python3 - howto

2012-04-06 Thread Helmut Jarausch
Hi I have a machine with a non-UTF8 local. I can't figure out how to make numpy.genfromtxt work I pipe some ascii data into the following script but get this bytes to str hell. Many thanks for a hint, Helmut. #!/usr/bin/python3 import numpy as np import io import sys inpstream = io.open(sys.s