diff options
Diffstat (limited to 'numpy/core/src')
-rw-r--r-- | numpy/core/src/arraymethods.c | 4 | ||||
-rw-r--r-- | numpy/core/src/multiarraymodule.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/numpy/core/src/arraymethods.c b/numpy/core/src/arraymethods.c index 2de6e664f..a693f42ef 100644 --- a/numpy/core/src/arraymethods.c +++ b/numpy/core/src/arraymethods.c @@ -24,7 +24,7 @@ array_take(PyArrayObject *self, PyObject *args, PyObject *kwds) &mode)) return NULL; - return _ARET(PyArray_TakeOut(self, indices, dimension, out, mode)); + return _ARET(PyArray_TakeFrom(self, indices, dimension, out, mode)); } static char doc_fill[] = "a.fill(value) places the scalar value at every "\ @@ -57,7 +57,7 @@ array_put(PyArrayObject *self, PyObject *args, PyObject *kwds) PyArray_ClipmodeConverter, &mode)) return NULL; - return PyArray_PutIn(self, values, indices, mode); + return PyArray_PutTo(self, values, indices, mode); } static char doc_putmask[] = "a.putmask(values, mask) sets a.flat[n] = v[n] "\ diff --git a/numpy/core/src/multiarraymodule.c b/numpy/core/src/multiarraymodule.c index ac3df1e15..bdda86a83 100644 --- a/numpy/core/src/multiarraymodule.c +++ b/numpy/core/src/multiarraymodule.c @@ -826,7 +826,8 @@ PyArray_Compress(PyArrayObject *self, PyObject *condition, int axis, res = PyArray_Nonzero(cond); Py_DECREF(cond); if (res == NULL) return res; - ret = PyArray_Take(self, PyTuple_GET_ITEM(res, 0), axis); + ret = PyArray_TakeFrom(self, PyTuple_GET_ITEM(res, 0), axis, + out, NPY_RAISE); Py_DECREF(res); return ret; } @@ -3236,8 +3237,8 @@ PyArray_ArgMax(PyArrayObject *op, int axis, PyArrayObject *out) Take */ static PyObject * -PyArray_TakeOut(PyArrayObject *self0, PyObject *indices0, int axis, - PyArrayObject *ret, NPY_CLIPMODE clipmode) +PyArray_TakeFrom(PyArrayObject *self0, PyObject *indices0, int axis, + PyArrayObject *ret, NPY_CLIPMODE clipmode) { PyArrayObject *self, *indices; intp nd, i, j, n, m, max_item, tmp, chunk; @@ -3385,7 +3386,7 @@ PyArray_TakeOut(PyArrayObject *self0, PyObject *indices0, int axis, Put values into an array */ static PyObject * -PyArray_PutIn(PyArrayObject *self, PyObject* values0, PyObject *indices0, +PyArray_PutTo(PyArrayObject *self, PyObject* values0, PyObject *indices0, NPY_CLIPMODE clipmode) { PyArrayObject *indices, *values; |