[Numpy-discussion] Renaming a field of an object array
Wed Feb 4 16:50:38 CST 2009
I'm a tad puzzled by the following behavior (I'm trying to correct a
bug in genfromtxt):
I'm creating an empty structured ndarray, using np.object as dtype.
>>> a = np.empty(1,dtype=[('',np.object)])
Now, I'd like to rename the field:
TypeError: Cannot change data-type for object array.
I understand why I can't change the *type* of the field, but not why I
can't change its name that way. What would be an option that wouldn't
involve creating a new array ?
Thx in advance.
More information about the Numpy-discussion