diff options
author | Han Genuit <hangenuit@gmail.com> | 2012-09-11 23:58:23 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2013-04-11 16:59:18 +0200 |
commit | 698f57fb2d0c20f7ce7f37267a6e9a1463add0e6 (patch) | |
tree | 72b33b77d27a6fc523a5dc6c5be4302aedb7bbe5 | |
parent | fc52c2887d854bce389cc5185704b35a509aae07 (diff) | |
download | numpy-698f57fb2d0c20f7ce7f37267a6e9a1463add0e6.tar.gz |
DOC: Re-insert comment
-rw-r--r-- | numpy/core/src/multiarray/mapping.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c index 88ba84f70..8c5a38d9b 100644 --- a/numpy/core/src/multiarray/mapping.c +++ b/numpy/core/src/multiarray/mapping.c @@ -564,7 +564,14 @@ array_subscript_simple(PyArrayObject *self, PyObject *op) PyArrayObject *ret; npy_intp value; - + /* + * PyNumber_Index was introduced in Python 2.5 because of NumPy. + * http://www.python.org/dev/peps/pep-0357/ + * Let's use it for indexing! + * + * Unfortunately, SciPy and possibly other code seems to rely + * on the lenient coercion. :( + */ if (!(PyArray_Check(op) && (PyArray_SIZE((PyArrayObject*)op) > 1))) { #if 0 /*PY_VERSION_HEX >= 0x02050000*/ PyObject *ind = PyNumber_Index(op); |