On the Python side, I can create new numpy record arrays as follows:
numpy.zeros((3,), dtype=[('a', 'i4'), ('b', 'U5')])
How do I do the same from a C program? I suppose I have to call PyArray_SimpleNewFromDescr(nd, dims, descr)
, but how do I construct a PyArray_Descr
that is appropriate for passing as the third argument to PyArray_SimpleNewFromDescr
?