[Numpy-discussion] Rename record array fields (with object arrays)

Travis E. Oliphant oliphant@enthought....
Sat Mar 1 22:43:40 CST 2008


Travis E. Oliphant wrote:
> Sameer DCosta wrote:
>   
>> Hi,
>>
>> I'm having trouble renaming record array fields if they contain object
>> arrays in them. I followed the solutions posted by Robert Kern and
>> Stefan van der Walt  (Thanks again) but it doesn't look like this
>> method works in all cases. For reference:
>> http://projects.scipy.org/pipermail/numpy-discussion/2008-February/031509.html
>>
>> In [1]: from numpy import *
>>
>> In [2]: olddt = dtype([('foo', '|O4'), ('bar', float)])
>>
>> In [3]: a = zeros(10, olddt)
>>     

Can you try:

olddt.names = ['notfoo', 'notbar']

on a recent SVN tree.  This should now work....

-Travis



More information about the Numpy-discussion mailing list