[Numpy-discussion] Memory layout of record arrays
Thu Jul 30 13:01:11 CDT 2009
Thanks for the quick answer. It makes sense.
I will have to find some other way to do it then.
On 30 Jul, 2009, at 18:52 , David Cournapeau wrote:
> On Fri, Jul 31, 2009 at 12:53 AM, Nicolas
> Rougier<Nicolas.Rougier@loria.fr> wrote:
>> I've been using record arrays to create arrays with different types
>> and since I'm doing a lot of computation on each of the different
>> fields, the default memory layout does not serve my computations.
>> Ideally, I would like to have record arrays where each field is a
>> contiguous block of memory.
> I don't think you can do it with record arrays: one of the fundamental
> design choice of numpy array layout is that the data pointer points to
> one block of N items, where each item is described by the dtype. To
> have contiguous layout for each member of the structured dtype, you
> need two arrays with the corresponding dtype.
> NumPy-Discussion mailing list
More information about the NumPy-Discussion