[Numpy-discussion] Enum/Factor NEP (now with code)

Francesc Alted francesc@continuum...
Thu Jun 14 05:48:36 CDT 2012


On 6/13/12 8:12 PM, Nathaniel Smith wrote:
>>> I'm also worried that I still don't see any signs that you're working
>>> with the downstream libraries that this functionality is intended to
>>> be useful for, like the various HDF5 libraries and pandas. I really
>>> don't think this functionality can be merged to numpy until we have
>>> affirmative statements from those developers that they are excited
>>> about it and will use it, and since they're busy people, it's pretty
>>> much your job to track them down and make sure that your code will
>>> solve their problems.
>> Francesc is certainly aware of this work, and I emailed Wes earlier this
>> week, I probably should have mentioned that, though. Hopefully they will
>> have time to contribute their thoughts. I also imagine Travis can speak
>> on behalf of the users he has interacted with over the last several
>> years that have requested this feature that don't happen to follow
>> mailing lists.
> I'm glad Francesc and Wes are aware of the work, but my point was that
> that isn't enough. So if I were in your position and hoping to get
> this code merged, I'd be trying to figure out how to get them more
> actively on board?

Sorry to chime in late.  Yes, I am aware of the improvements that Bryan 
(and Mark) are proposing.  My position here is that I'm very open to 
this (at least from a functional point of view; I have to recognize that 
I have not had a look into the code).

The current situation for the HDF5 wrappers (at least PyTables ones) is 
that, due to the lack of support of enums in NumPy itself, we had to 
come with a specific solution for this.  Our approach was pretty simple: 
basically providing an exhaustive set or list of possible, named values 
for different integers.  And although I'm not familiar with the 
implementation details (it was Ivan Vilata who implemented this part), I 
think we used an internal dictionary for doing the translation while 
PyTables is presenting the enums to the user.

Bryan is implementing a much more complete (and probably more efficient) 
support for enums in NumPy.  As this is new functionality, and PyTables 
does not trust on it, there is not an immediate danger (i.e. a backward 
incompatibility) on introducing the new enums in NumPy.  But they could 
be used for future PyTables versions (and other HDF5 wrappers), which is 
a good thing indeed.

My 2 cents,

-- 
Francesc Alted



More information about the NumPy-Discussion mailing list