Suppose I have a recarray such as the following:
import numpy as np
# example data from @unutbu\'s answer
recs = [(\'Bill\', \'31\', 260.0), (\'Fred\', 15,
There are basically two steps. My stumbling block was in finding how to modify an existing dtype. This is how I did it:
# change dtype by making a whole new array
dt = data.dtype
dt = dt.descr # this is now a modifiable list, can't modify numpy.dtype
# change the type of the first col:
dt[0] = (dt[0][0], 'float64')
dt = numpy.dtype(dt)
# data = numpy.array(data, dtype=dt) # option 1
data = data.astype(dt)