summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/src/multiarray/mapping.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c
index 28e69b94e..f65f80690 100644
--- a/numpy/core/src/multiarray/mapping.c
+++ b/numpy/core/src/multiarray/mapping.c
@@ -344,6 +344,8 @@ prepare_index(PyArrayObject *self, PyObject *index,
* Single integer index, there are two cases here.
* It could be an array, a 0-d array is handled
* a bit weird however, so need to special case it.
+ *
+ * Check for integers first, purely for performance
*/
#if !defined(NPY_PY3K)
if (PyInt_CheckExact(obj) || !PyArray_Check(obj)) {