Permalink
Browse files

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.
  • Loading branch information...
seberg committed May 4, 2013
1 parent 5b9da00 commit f9c95555c23cf5429a795ef73f8fb2b3941d434c
Showing with 3 additions and 5 deletions.
  1. +3 −5 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;
}
}

0 comments on commit f9c9555

Please sign in to comment.