I'd like to allocate, zero-initialize and return a cython memoryview of an aribitrary number of elements. Element type should be uint32_t (and in some cases uint16_t).
A problem seems to be to find the right format code for the fixed size integer type, is there a good way to do this, or does it come down to testing each of the alternatives (for example using struct.calcsize)?
(Without using numpy.)