diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-09-12 20:02:43 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2020-09-12 20:22:39 -0600 |
commit | 7e83009913abd88ed94361439865f413ec6cbe8a (patch) | |
tree | fbd0bd3f0f0a52853a892b488ec51773b053632b /numpy | |
parent | 9dd6c60bfccea7f78371e1b88f223b93ae69d037 (diff) | |
download | numpy-7e83009913abd88ed94361439865f413ec6cbe8a.tar.gz |
MAINT: Replace a couple of missed npy_3kcompat macros
- Replace the npy_3kcompat PyBaseString_Check macro by its definition
- Replace the npy_3kcompat NpySlice_GetIndicesEx macro by its definition
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/descriptor.c | 4 | ||||
-rw-r--r-- | numpy/core/src/multiarray/iterators.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c index e64276921..6e378f626 100644 --- a/numpy/core/src/multiarray/descriptor.c +++ b/numpy/core/src/multiarray/descriptor.c @@ -1202,7 +1202,7 @@ _convert_from_dict(PyObject *obj, int align) Py_DECREF(tup); goto fail; } - if (!PyBaseString_Check(name)) { + if (!PyUnicode_Check(name)) { PyErr_SetString(PyExc_ValueError, "field names must be strings"); Py_DECREF(tup); @@ -1228,7 +1228,7 @@ _convert_from_dict(PyObject *obj, int align) goto fail; } if (len == 3) { - if (PyBaseString_Check(title)) { + if (PyUnicode_Check(title)) { if (PyDict_GetItemWithError(fields, title) != NULL) { PyErr_SetString(PyExc_ValueError, "title already used as a name or title."); diff --git a/numpy/core/src/multiarray/iterators.c b/numpy/core/src/multiarray/iterators.c index 96f501c55..31795b2d0 100644 --- a/numpy/core/src/multiarray/iterators.c +++ b/numpy/core/src/multiarray/iterators.c @@ -61,7 +61,7 @@ parse_index_entry(PyObject *op, npy_intp *step_size, } else if (PySlice_Check(op)) { npy_intp stop; - if (NpySlice_GetIndicesEx(op, max, &i, &stop, step_size, n_steps) < 0) { + if (PySlice_GetIndicesEx(op, max, &i, &stop, step_size, n_steps) < 0) { goto fail; } if (*n_steps <= 0) { |