Re: [Numpy-discussion] draft enum NEP

2012-03-17 Thread Nathaniel Smith
On Fri, Mar 16, 2012 at 4:26 PM, Bryan Van de Ven bry...@continuum.io wrote: Hi all, I have spent some time thinking about things, and discussing them with folks nearby. I actually got to wondering whether we really need new dtypes for this. It seems like enumerated values or factor levels

Re: [Numpy-discussion] draft enum NEP

2012-03-16 Thread Nathaniel Smith
On Mar 16, 2012 1:02 AM, Stéfan van der Walt stefan ste...@sun.ac.za@ste...@sun.ac.za sun.ac.za ste...@sun.ac.za wrote: On Thu, Mar 15, 2012 at 4:02 PM, Nathaniel Smith njs n...@pobox.com@n...@pobox.com pobox.com n...@pobox.com wrote: I'm not sure what it would even mean to treat this kind

Re: [Numpy-discussion] draft enum NEP

2012-03-16 Thread Bryan Van de Ven
Hi all, I have spent some time thinking about things, and discussing them with folks nearby. I actually got to wondering whether we really need new dtypes for this. It seems like enumerated values or factor levels could be cast as an annotation or metadata that could be attached to any

Re: [Numpy-discussion] draft enum NEP

2012-03-15 Thread Nathaniel Smith
On Wed, Mar 14, 2012 at 1:44 AM, Mark Wiebe mwwi...@gmail.com wrote: On Fri, Mar 9, 2012 at 8:55 AM, Bryan Van de Ven bry...@continuum.io wrote: Hi all, I have started working on a NEP for adding an enumerated type to NumPy. It is on my GitHub:    

Re: [Numpy-discussion] draft enum NEP

2012-03-15 Thread Benjamin Root
On Thursday, March 15, 2012, Nathaniel Smith n...@pobox.com wrote: On Wed, Mar 14, 2012 at 1:44 AM, Mark Wiebe mwwi...@gmail.com wrote: On Fri, Mar 9, 2012 at 8:55 AM, Bryan Van de Ven bry...@continuum.io wrote: Hi all, I have started working on a NEP for adding an enumerated type to NumPy.

Re: [Numpy-discussion] draft enum NEP

2012-03-15 Thread Stéfan van der Walt
On Thu, Mar 15, 2012 at 4:02 PM, Nathaniel Smith n...@pobox.com wrote: I'm not sure what it would even mean to treat this kind of data as flags, since you can't take the bitwise-or of two strings... This makes a more sense outside of ndarrays, where you would do something like: enum FLAG0 = 1,

Re: [Numpy-discussion] draft enum NEP

2012-03-13 Thread Mark Wiebe
On Fri, Mar 9, 2012 at 8:55 AM, Bryan Van de Ven bry...@continuum.iowrote: Hi all, I have started working on a NEP for adding an enumerated type to NumPy. It is on my GitHub: https://github.com/bryevdv/numpy/blob/enum/doc/neps/enum.rst It is still very rough, and incomplete in places.

Re: [Numpy-discussion] draft enum NEP

2012-03-13 Thread Dag Sverre Seljebotn
On 03/13/2012 06:44 PM, Mark Wiebe wrote: On Fri, Mar 9, 2012 at 8:55 AM, Bryan Van de Ven bry...@continuum.io mailto:bry...@continuum.io wrote: Hi all, I have started working on a NEP for adding an enumerated type to NumPy. It is on my GitHub:

Re: [Numpy-discussion] draft enum NEP

2012-03-11 Thread Wes McKinney
On Fri, Mar 9, 2012 at 5:48 PM, David Gowers (kampu) 00a...@gmail.com wrote: Hi, On Sat, Mar 10, 2012 at 3:25 AM, Bryan Van de Ven bry...@continuum.io wrote: Hi all, I have started working on a NEP for adding an enumerated type to NumPy. It is on my GitHub:    

Re: [Numpy-discussion] draft enum NEP

2012-03-11 Thread David Gowers (kampu)
Hi Wes, On Mon, Mar 12, 2012 at 9:33 AM, Wes McKinney wesmck...@gmail.com wrote: Now, one problem with this is that you want the mapping + dtype to be invertible (otherwise you're left doing some type inference). The way that I implement the mapping is to restrict the labeling to be from 0

[Numpy-discussion] draft enum NEP

2012-03-09 Thread Bryan Van de Ven
Hi all, I have started working on a NEP for adding an enumerated type to NumPy. It is on my GitHub: https://github.com/bryevdv/numpy/blob/enum/doc/neps/enum.rst It is still very rough, and incomplete in places. But I would like to get feedback sooner rather than later in order to refine

Re: [Numpy-discussion] draft enum NEP

2012-03-09 Thread Nathaniel Smith
On Fri, Mar 9, 2012 at 4:55 PM, Bryan Van de Ven bry...@continuum.io wrote: Hi all, I have started working on a NEP for adding an enumerated type to NumPy. It is on my GitHub:     https://github.com/bryevdv/numpy/blob/enum/doc/neps/enum.rst It is still very rough, and incomplete in places.

Re: [Numpy-discussion] draft enum NEP

2012-03-09 Thread David Gowers (kampu)
Hi, On Sat, Mar 10, 2012 at 3:25 AM, Bryan Van de Ven bry...@continuum.io wrote: Hi all, I have started working on a NEP for adding an enumerated type to NumPy. It is on my GitHub:     https://github.com/bryevdv/numpy/blob/enum/doc/neps/enum.rst It is still very rough, and incomplete in