Re: [Numpy-discussion] Python3, genfromtxt and unicode

2012-05-01 Thread Charles R Harris
On Fri, Apr 27, 2012 at 8:17 PM, Antony Lee antony@berkeley.edu wrote: With bytes fields, genfromtxt(dtype=None) sets the sizes of the fields to the largest number of chars (npyio.py line 1596), but it doesn't do the same for unicode fields, which is a pity. See example below. I tried to

Re: [Numpy-discussion] Python3, genfromtxt and unicode

2012-05-01 Thread Antony Lee
Sure, I will. Right now my solution is to use genfromtxt once with bytes and auto-dtype detection, then modify the resulting dtype, replacing bytes with unicodes, and use that new dtypes for a second round of genfromtxt. A bit awkward but that gets the job done. Antony Lee 2012/5/1 Charles R

[Numpy-discussion] Python3, genfromtxt and unicode

2012-04-27 Thread Antony Lee
With bytes fields, genfromtxt(dtype=None) sets the sizes of the fields to the largest number of chars (npyio.py line 1596), but it doesn't do the same for unicode fields, which is a pity. See example below. I tried to change npyio.py around line 1600 to add that but it didn't work; from my