diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/conversion_utils.c | 7 | ||||
-rw-r--r-- | numpy/core/src/multiarray/number.c | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/numpy/core/src/multiarray/conversion_utils.c b/numpy/core/src/multiarray/conversion_utils.c index 71690c20b..3ea5957b9 100644 --- a/numpy/core/src/multiarray/conversion_utils.c +++ b/numpy/core/src/multiarray/conversion_utils.c @@ -96,13 +96,16 @@ PyArray_IntpConverter(PyObject *obj, PyArray_Dims *seq) if (len == -1) { /* Check to see if it is an integer number */ if (PyNumber_Check(obj)) { - /* DEPRECATED: replace PyNumber_Check with PyIndex_Check */ + /* + * After the deprecation the PyNumber_Check could be replaced + * by PyIndex_Check. + */ len = 1; } } if (len < 0) { PyErr_SetString(PyExc_TypeError, - "expected sequence object with len >= 0 or a single integer"); + "expected sequence object with len >= 0 or a single integer"); return NPY_FAIL; } if (len > NPY_MAXDIMS) { diff --git a/numpy/core/src/multiarray/number.c b/numpy/core/src/multiarray/number.c index 53218117a..9e13d0f29 100644 --- a/numpy/core/src/multiarray/number.c +++ b/numpy/core/src/multiarray/number.c @@ -841,8 +841,8 @@ array_index(PyArrayObject *v) return NULL; } if (PyArray_NDIM(v) != 0) { - if (DEPRECATE("converting an array with ndim > 0 to an index" - " will result in an error in the future") < 0) { + if (DEPRECATE("converting an array with ndim > 0 to an index" + " will result in an error in the future") < 0) { return NULL; } } |