import numpy as np
recs = [('Bill', '31', 260.0), ('Fred', 15, '145.0')]
r = np.rec.fromrecords(recs, formats='S30,i2,f4', names='name, age, weight')
print(r)
How to change the dtype of a numpy recarray?