diff options
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 3b818b224..6676bce93 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -6781,12 +6781,14 @@ array_data_get(PyArrayObject *self) return NULL; } nbytes = PyArray_NBYTES(self); - if PyArray_ISWRITEABLE(self) + if PyArray_ISWRITEABLE(self) { return PyBuffer_FromReadWriteObject((PyObject *)self, 0, (Py_ssize_t) nbytes); - else - return PyBuffer_FromObject((PyObject *)self, 0, + } + else { + return PyBuffer_FromObject((PyObject *)self, 0, (Py_ssize_t) nbytes); + } } static int |