diff options
| -rw-r--r-- | numpy/core/src/multiarray/nditer_pywrap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/multiarray/nditer_pywrap.c b/numpy/core/src/multiarray/nditer_pywrap.c index 61b5175ac..992d1c7f6 100644 --- a/numpy/core/src/multiarray/nditer_pywrap.c +++ b/numpy/core/src/multiarray/nditer_pywrap.c @@ -2011,10 +2011,10 @@ npyiter_seq_length(NewNpyArrayIterObject *self) } } -NPY_NO_EXPORT PyObject * +NPY_NO_EXPORT PyArrayObject * npyiter_seq_item(NewNpyArrayIterObject *self, Py_ssize_t i) { - PyObject *ret; + PyArrayObject *ret; npy_intp ret_ndim; npy_intp nop, innerloopsize, innerstride; @@ -2072,7 +2072,7 @@ npyiter_seq_item(NewNpyArrayIterObject *self, Py_ssize_t i) } Py_INCREF(dtype); - ret = (PyObject *)PyArray_NewFromDescr(&PyArray_Type, dtype, + ret = (PyArrayObject *)PyArray_NewFromDescr(&PyArray_Type, dtype, ret_ndim, &innerloopsize, &innerstride, dataptr, self->writeflags[i] ? NPY_ARRAY_WRITEABLE : 0, NULL); @@ -2082,7 +2082,7 @@ npyiter_seq_item(NewNpyArrayIterObject *self, Py_ssize_t i) return NULL; } - PyArray_UpdateFlags((PyArrayObject *)ret, NPY_ARRAY_UPDATE_ALL); + PyArray_UpdateFlags(ret, NPY_ARRAY_UPDATE_ALL); return ret; } |
