From 9fdcc603404de8f58340fc433933edf6425a57ba Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Sun, 30 Nov 2014 01:01:00 +0000 Subject: [PATCH] BUG: tighten alignment for complex types. Complex types memory representations in C are guaranteed to be equivalent to type[2]. As such, the alignment of complex should be the same as type. --- numpy/core/src/multiarray/arraytypes.c.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src index 89b5404b492c..25784c4e6815 100644 --- a/numpy/core/src/multiarray/arraytypes.c.src +++ b/numpy/core/src/multiarray/arraytypes.c.src @@ -4138,8 +4138,8 @@ NPY_NO_EXPORT PyArray_Descr @from@_Descr = { /* elsize */ @num@ * sizeof(@fromtype@), /* alignment */ - @num@ * _ALIGN(@fromtype@) > NPY_MAX_COPY_ALIGNMENT ? - NPY_MAX_COPY_ALIGNMENT : @num@ * _ALIGN(@fromtype@), + _ALIGN(@fromtype@) > NPY_MAX_COPY_ALIGNMENT ? + NPY_MAX_COPY_ALIGNMENT : _ALIGN(@fromtype@), /* subarray */ NULL, /* fields */