Skip to content

Commit

Permalink
BUG: Fix alignment bug in data copy routine
Browse files Browse the repository at this point in the history
Thanks to Matthew Brett for tracking this down on a 64-bit SPARC
running Debian.
  • Loading branch information
mwiebe committed Mar 6, 2012
1 parent 7d225bb commit 7c07089
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numpy/core/src/multiarray/dtype_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3846,9 +3846,9 @@ PyArray_CastRawArrays(npy_intp count,
}

/* Check data alignment */
aligned = (((npy_intp)src_dtype | src_stride) &
aligned = (((npy_intp)src | src_stride) &
(src_dtype->alignment - 1)) == 0 &&
(((npy_intp)dst_dtype | dst_stride) &
(((npy_intp)dst | dst_stride) &
(dst_dtype->alignment - 1)) == 0;

/* Get the function to do the casting */
Expand Down

0 comments on commit 7c07089

Please sign in to comment.