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 
existing integral dtypes. It spells differently enough that I have put 
up an alternate version that reflects this notion. I'd like to see what 
folks think of this direction:

     https://github.com/bryevdv/numpy/blob/enum/doc/neps/enum_alt.rst

So this would require adding machinery to existing dtypes to behave 
properly when there is factor metadata present. Perhaps that is not an 
acceptable trade-off, but it seems worth discussing.

I think a very similar approach could be used to add categorical ranges 
to any numerical or string types (I think they are called "shingles" in R?)

Please let me know what you think.

Bryan

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to