Hi Jason,
As I understand numpy has been set up to mirror C-structs as long as you
use the 'align' flag. For example, your struct can be represented as
np.dtype('f8,f4,i4,u8', align=True)
(assuming 32 bit floats). The offsets of the fields should be exactly
the offsets of the elements
After drilling through the sources a second time, I found it was
numpy/core/src/multiarray/descriptor.c was the file to consult with
the primary routine being PyArray_DescrConverter and _convert_from_*
functions being the most interesting to read and glean the
capabilities of this with.
So in
Hi folks,
The moderator for the ML approved my subscription so I can now post
this back in the numpy list rather than scipy. Apologies for the
duplicate/cross posting.
I was trying to figure out how to make a dtype for a c-struct on the
c-side and storing that in some boost python libraries