[Numpy-discussion] recarray field names

Erin Sheldon erin.sheldon at gmail.com
Wed Mar 15 15:42:04 CST 2006

On 3/15/06, Perry Greenfield <perry at stsci.edu> wrote:
> You are right that this is messy. We would like to change this
> sometime. But we'd like to complete the transition to numpy first
> before doing that so it may be some months before we can (and it may
> not look quite like what you suggest). But your point is very valid.
> Thanks, Perry

OK, fair enough.

Incidentally, I realized  that this attribute
_coldefs is not part of recarray anyway, but something added by pyfits.
I see now that the names and the formats with a greater than sign
concatenated on the front can be extracted from dtype:

In [247]: t.dtype
Out[247]: [('x', '>f4'), ('y', '>i4')]

I could write my own function to extract what I need, but I thought I
would ask: is there already a simpler way?  And is there a function to
compare this '>f4' stuff to the named types such as Float32 ('f')?

P.S. If it is man power that is preventing some of the simple things
like this from being implemented, I could volunteer some time.

More information about the Numpy-discussion mailing list