[Numpy-discussion] recarray slow?

Pierre GM pgmdevlist@gmail....
Wed Jul 21 15:41:00 CDT 2010


On Jul 21, 2010, at 4:35 PM, wheres pythonmonks wrote:

> What about:
> 
> idx_by_name = dict(enumerate(d.dtype.names))
> 
> Then I can look up the index of the columns I want before the loop,
> and then access by the index during the loop.

Sure. Why don't you try both approaches, time them and document it ? 
I still bet that manipulating tuples of numbers might be easier and more performant than juggling w/ the fields of a numpy.void, but that's a gut feeling only...


More information about the NumPy-Discussion mailing list