diff options
Diffstat (limited to 'numpy/numarray/_capi.c')
-rw-r--r-- | numpy/numarray/_capi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/numarray/_capi.c b/numpy/numarray/_capi.c index 6acf7324a..78187c50e 100644 --- a/numpy/numarray/_capi.c +++ b/numpy/numarray/_capi.c @@ -1082,7 +1082,7 @@ NA_OutputArray(PyObject *a, NumarrayType t, int requires) "NA_OutputArray: only arrays work for output."); return NULL; } - if (PyArray_RequireWriteable((PyArrayObject *)a, NULL) < 0) { + if (PyArray_FailUnlessWriteable((PyArrayObject *)a, "output array") < 0) { return NULL; } @@ -1128,7 +1128,7 @@ NA_IoArray(PyObject *a, NumarrayType t, int requires) /* Guard against non-writable, but otherwise satisfying requires. In this case, shadow == a. */ - if (!PyArray_RequireWriteable(shadow, NULL)) { + if (!PyArray_FailUnlessWriteable(shadow, "input/output array")) { PyArray_XDECREF_ERR(shadow); return NULL; } @@ -2487,7 +2487,7 @@ _setFromPythonScalarCore(PyArrayObject *a, long offset, PyObject*value, int entr static int NA_setFromPythonScalar(PyArrayObject *a, long offset, PyObject *value) { - if (PyArray_RequireWriteable(a, NULL) < 0) { + if (PyArray_FailUnlessWriteable(a, "array") < 0) { return -1; } return _setFromPythonScalarCore(a, offset, value, 0); |