I am importing data using numpy.genfromtxt, and I would like to add a field of values derived from some of those within the dataset. As this is a structured array, it seems like the most simple, efficient way of adding a new column to the array is by using numpy.lib.recfunctions.append_fields(). I found a good description of this library HERE.
Is there a way of doing this without copying the array, perhaps by forcing genfromtxt to create an empty column to which I can append derived values?
genfromtxtcan be a generator, within which, you can create an empty column on each line of your file while you're reading it in.