<p>On the Python side, I can create new numpy record arrays as follows:</p>

<pre><code>numpy.zeros((3,), dtype=[('a', 'i4'), ('b', 'U5')])
</code></pre>

<p>How do I do the same from a C program?  I suppose I have to call <code>PyArray_SimpleNewFromDescr(nd, dims, descr)</code>, but how do I construct a <code>PyArray_Descr</code> that is appropriate for passing as the third argument to <code>PyArray_SimpleNewFromDescr</code>?</p>

See the
Guide to NumPy
, section 13.3.10.  There's lots of different ways to make a descriptor, although it's not nearly as easy as writing
```
[('a', 'i4'), ('b', 'U5')]
```
.