[Numpy-discussion] adding field to rec array

John Hunter jdh2358@gmail....
Wed Sep 26 12:40:29 CDT 2007

I have a record array r and I want to add a new field to it.  I have
been looking at setfield but I am not sure how to use it for this
purpose.  Eg

# r is some npy record array
N = len(r)
x = npy.zeros(N)
# add array of floats x to r with dtype name 'jdh' and type '<f8'

Any suggestions?


More information about the Numpy-discussion mailing list