From f9c95555c23cf5429a795ef73f8fb2b3941d434c Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Sat, 4 May 2013 14:48:42 +0200 Subject: 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. --- numpy/core/src/multiarray/multiarray_tests.c.src | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'numpy') 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; } } -- cgit v1.2.1