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)
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