summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-06-19 10:02:28 -0600
committerGitHub <noreply@github.com>2018-06-19 10:02:28 -0600
commitebedea271a5bb0f7a3251c6d390fd14652912118 (patch)
tree25c964eef273c39939882d198fa4fd6cae78d8d0
parent717840c91029ac0680110838eec0103d23ccb32c (diff)
parent48e36e8a1746ddb949c5e27522d80874330283ac (diff)
downloadnumpy-ebedea271a5bb0f7a3251c6d390fd14652912118.tar.gz
Merge pull request #11379 from fivemok/fix-11378
BUG: changed hardcoded axis to 0 for checking indices
-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 fa68af19a..b25b4a8b6 100644
--- a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src
+++ b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src
@@ -1371,7 +1371,7 @@ PyArray_TransferMaskedStridedToNDim(npy_intp ndim,
*/
/*
- * Advanded indexing iteration of arrays when there is a single indexing
+ * Advanced indexing iteration of arrays when there is a single indexing
* array which has the same memory order as the value array and both
* can be trivially iterated (single stride, aligned, no casting necessary).
*/
@@ -1405,7 +1405,7 @@ mapiter_trivial_@name@(PyArrayObject *self, PyArrayObject *ind,
/* Check the indices beforehand */
while (itersize--) {
npy_intp indval = *((npy_intp*)ind_ptr);
- if (check_and_adjust_index(&indval, fancy_dim, 1, _save) < 0 ) {
+ if (check_and_adjust_index(&indval, fancy_dim, 0, _save) < 0 ) {
return -1;
}
ind_ptr += ind_stride;
@@ -1437,7 +1437,7 @@ mapiter_trivial_@name@(PyArrayObject *self, PyArrayObject *ind,
npy_intp indval = *((npy_intp*)ind_ptr);
assert(npy_is_aligned(ind_ptr, _ALIGN(npy_intp)));
#if @isget@
- if (check_and_adjust_index(&indval, fancy_dim, 1, _save) < 0 ) {
+ if (check_and_adjust_index(&indval, fancy_dim, 0, _save) < 0 ) {
return -1;
}
#else