summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wiebe <mwwiebe@gmail.com>2012-03-05 19:52:04 -0800
committerMark Wiebe <mwwiebe@gmail.com>2012-03-05 19:56:46 -0800
commit7c070892e22d988e663e9b2ec3ba9d60c47696e8 (patch)
tree6424114d3513a65f6748d04474c8965b4839c693
parent7d225bb13db65de26d504559d815aac775ed0426 (diff)
downloadnumpy-7c070892e22d988e663e9b2ec3ba9d60c47696e8.tar.gz
BUG: Fix alignment bug in data copy routine
Thanks to Matthew Brett for tracking this down on a 64-bit SPARC running Debian.
-rw-r--r--numpy/core/src/multiarray/dtype_transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/dtype_transfer.c b/numpy/core/src/multiarray/dtype_transfer.c
index 47c487338..46acd046f 100644
--- a/numpy/core/src/multiarray/dtype_transfer.c
+++ b/numpy/core/src/multiarray/dtype_transfer.c
@@ -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 */