pythonnumpyrecarray

Adding a field to a structured numpy array (2)


I know there was already a question about this topic (cleanest way to add a field to a structured numpy array), see

Adding a field to a structured numpy array

but I have a question about the answer given there ...

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

I still have numpy 1.3, but it doesn't recognise this function, and I also didn't find anything about it in the documentation of numpy. What happened with the function? Is there another function that can do the same?


Solution

  • As far as documentation for the recfunctions, here it is: http://pyopengl.sourceforge.net/pydoc/numpy.lib.recfunctions.html

    If you can't figure it out after reading that, then please provide some code samples (for instance, did you import numpy.lib.recfunctions?) and an error message or undesired result, so we can determine how to fix it.