summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2013-05-04 14:48:42 +0200
committerSebastian Berg <sebastian@sipsolutions.net>2013-05-07 17:06:40 +0200
commitf9c95555c23cf5429a795ef73f8fb2b3941d434c (patch)
tree86f9d743766cbefc6b824e74755ffda7ea790a52 /numpy/core
parent5b9da00736edf996b8422cbb46f89b87691b7902 (diff)
downloadnumpy-f9c95555c23cf5429a795ef73f8fb2b3941d434c.tar.gz
MAINT: Remove unnecessary and wrong check for mapiterswap
With the slight modification of the MapIter API to allow newaxis in fancy indexes, the MapIterObject consec field is already the axis to transpose to, and with a leading newaxis, even if iteraxes[0] is 0, consec may not be 0.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/src/multiarray/multiarray_tests.c.src8
1 files changed, 3 insertions, 5 deletions
diff --git a/numpy/core/src/multiarray/multiarray_tests.c.src b/numpy/core/src/multiarray/multiarray_tests.c.src
index 4aa179b68..f22b7462d 100644
--- a/numpy/core/src/multiarray/multiarray_tests.c.src
+++ b/numpy/core/src/multiarray/multiarray_tests.c.src
@@ -471,11 +471,9 @@ map_increment(PyArrayMapIterObject *mit, PyObject *op, inplace_map_binop add_inp
}
if ((mit->subspace != NULL) && (mit->consec)) {
- if (mit->iteraxes[0] > 0) {
- PyArray_MapIterSwapAxes(mit, (PyArrayObject **)&arr, 0);
- if (arr == NULL) {
- return -1;
- }
+ PyArray_MapIterSwapAxes(mit, (PyArrayObject **)&arr, 0);
+ if (arr == NULL) {
+ return -1;
}
}