summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2013-06-11 23:50:05 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2013-06-11 23:50:05 +0200
commite2dd429afc204bc60e2db0f6ad4fb706ab93c273 (patch)
treedf7c095c759249d49f11633fd0c7fe2e016d8c63
parentaef286debfd11a62f1c337dea55624cee7fd4d9e (diff)
downloadnumpy-e2dd429afc204bc60e2db0f6ad4fb706ab93c273.tar.gz
BUG: fix non-swapping strided copies in GetStridedCopySwap
Fixed PyArray_GetStridedCopySwap{Pair,}Fn returns paths that do not swap the data. It never triggered because the alignment requirement for complex data was too low (4-8 bytes) and always fullfiled by the memory allocator. As this is now fixed it caused failures on sparc with 16 byte long doubles.
-rw-r--r--numpy/core/src/multiarray/lowlevel_strided_loops.c.src6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src
index bfa7ca224..b0770168f 100644
--- a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src
+++ b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src
@@ -532,7 +532,7 @@ NPY_NO_EXPORT PyArray_StridedUnaryOp *
/**end repeat1**/
}
- return &_strided_to_strided;
+ return &_swap@tag@_strided_to_strided;
}
else {
switch (itemsize) {
@@ -580,7 +580,7 @@ NPY_NO_EXPORT PyArray_StridedUnaryOp *
}
}
- return &_strided_to_strided;
+ return &_swap@tag@_strided_to_strided;
}
/* general dst */
else {
@@ -597,7 +597,7 @@ NPY_NO_EXPORT PyArray_StridedUnaryOp *
/**end repeat1**/
}
- return &_strided_to_strided;
+ return &_swap@tag@_strided_to_strided;
}
/* general src */
else {