Skip to content

Commit

Permalink
BUG: tighten alignment for complex types.
Browse files Browse the repository at this point in the history
Complex types memory representations in C are guaranteed to be equivalent to
type[2]. As such, the alignment of complex<type> should be the same as type.
  • Loading branch information
cournape committed Nov 30, 2014
1 parent 31b94e8 commit 9fdcc60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numpy/core/src/multiarray/arraytypes.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 9fdcc60

Please sign in to comment.