Adding a field to a structured numpy array

If you’re using numpy 1.3, there’s also numpy.lib.recfunctions.append_fields().

For many installations, you’ll need to import numpy.lib.recfunctions to access this. import numpy will not allow one to see the numpy.lib.recfunctions

Leave a Comment