Re: [Numpy-discussion] Text array dtype for numpy

2014-01-25 Thread Oscar Benjamin
On 24 January 2014 22:43, Chris Barker chris.bar...@noaa.gov wrote: Oscar, Cool stuff, thanks! I'm wondering though what the use-case really is. The use-case is precisely the use-case for dtype='S' on Py2 except that it also works on Py3. The P3 text model (actually the py2 one, too), is

Re: [Numpy-discussion] Text array dtype for numpy

2014-01-24 Thread Chris Barker
Oscar, Cool stuff, thanks! I'm wondering though what the use-case really is. The P3 text model (actually the py2 one, too), is quite clear that you want users to think of, and work with, text as text -- and not care how things are encoding in the underlying implementation. You only want the

Re: [Numpy-discussion] Text array dtype for numpy

2014-01-24 Thread josef . pktd
On Fri, Jan 24, 2014 at 5:43 PM, Chris Barker chris.bar...@noaa.gov wrote: Oscar, Cool stuff, thanks! I'm wondering though what the use-case really is. The P3 text model (actually the py2 one, too), is quite clear that you want users to think of, and work with, text as text -- and not care

[Numpy-discussion] Text array dtype for numpy

2014-01-23 Thread Oscar Benjamin
There have been a few threads discussing the problems of how to do text with numpy arrays in Python 3. To make a slightly more concrete proposal, I've implemented a pure Python ndarray subclass that I believe can consistently handle text/bytes in Python 3. It is intended to be an illustration