[Numpy-discussion] How to change the dtype of a structured or record array
Stéfan van der Walt
Tue Sep 15 07:46:17 CDT 2009
2009/9/14 Bruce Southey <firstname.lastname@example.org>:
> I would like to change the dtype of just one field of a structured or
> record array without copying the original array. I can not change the
> creation of the original array because it was created using genfromtxt.
You can't do that, unfortunately. You can view the array using any
dtype of the same length as the old one, but you can't modify the
length of single elements without re-allocation.
More information about the NumPy-Discussion