[Numpy-discussion] record array with array elements
Tue Jan 6 22:21:15 CST 2009
On Tue, Jan 6, 2009 at 22:04, Igor Sylvester <email@example.com> wrote:
> If array fields should be of the form (name,subdtype, shape), how do I
> specify field offsets? My datatype is word-aligned.
With dtype(some_list), you need to explicitly include the padding.
E.g. ('', '|V4') to add 4 bytes of padding. Alternately, you can use
formats=['u1', ('u1', (2,2))],
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion