[Numpy-discussion] rec_append_fields and n-dimensional fields
Thomas Robitaille
thomas.robitaille@gmail....
Wed Oct 14 08:52:29 CDT 2009
Hi,
I'm interested in constructing a recarray with fields that have two or
more dimensions. This can be done from scratch like this:
r = np.recarray((10,),dtype=[('c1',float,(3,))])
However, I am interested in appending a field to an existing recarray.
Rather than repeating existing code I would like to use the
numpy.lib.recfunctions.rec_append_fields method, but I am not sure how
to specify the dimension of each field, since it doesn't seem to be
possible to specify the dtype as a tuple as above.
Thanks for any advice,
Thomas
More information about the NumPy-Discussion
mailing list