diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/buffer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/buffer.c b/numpy/core/src/multiarray/buffer.c index 0bee223eb..da4f4e6c9 100644 --- a/numpy/core/src/multiarray/buffer.c +++ b/numpy/core/src/multiarray/buffer.c @@ -418,8 +418,7 @@ _buffer_format_string(PyArray_Descr *descr, _tmp_string_t *str, break; } default: - PyArray_DTypeMeta *DType = NPY_DTYPE(descr); - if (NPY_DT_is_legacy(DType)) { + if (NPY_DT_is_legacy(NPY_DTYPE(descr))) { PyErr_Format(PyExc_ValueError, "cannot include dtype '%c' in a buffer", descr->kind); @@ -427,7 +426,7 @@ _buffer_format_string(PyArray_Descr *descr, _tmp_string_t *str, else { PyErr_Format(PyExc_ValueError, "cannot include dtype '%s' in a buffer", - ((PyTypeObject*)DType)->tp_name); + ((PyTypeObject*)NPY_DTYPE(descr))->tp_name); } return -1; } |