summaryrefslogtreecommitdiff
path: root/numpy/core/src/umath
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-06-07 21:22:55 -0700
committerGitHub <noreply@github.com>2018-06-07 21:22:55 -0700
commitda5eaf97281453083252c22b2b94aded846a936b (patch)
treea5e066d136b1cc82754302742b4bb028f7d408cb /numpy/core/src/umath
parent4b0432afef28f631f1cf36aed81b08e5dfc3991c (diff)
parenta0b2f3a5ee665ba68235c9f8e9503b294748b8e1 (diff)
downloadnumpy-da5eaf97281453083252c22b2b94aded846a936b.tar.gz
Merge pull request #11246 from eric-wieser/pyarray_new_with_base
BUG: Set ndarray.base before __array_finalize__
Diffstat (limited to 'numpy/core/src/umath')
-rw-r--r--numpy/core/src/umath/reduction.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/core/src/umath/reduction.c b/numpy/core/src/umath/reduction.c
index 5c3a84e21..8136d7b3f 100644
--- a/numpy/core/src/umath/reduction.c
+++ b/numpy/core/src/umath/reduction.c
@@ -155,13 +155,13 @@ conform_reduce_result(int ndim, npy_bool *axis_flags,
dtype = PyArray_DESCR(out);
Py_INCREF(dtype);
- ret = (PyArrayObject_fields *)PyArray_NewFromDescr(&PyArray_Type,
- dtype,
- ndim, shape,
- strides,
- PyArray_DATA(out),
- PyArray_FLAGS(out),
- NULL);
+ /* TODO: use PyArray_NewFromDescrAndBase here once multiarray and umath
+ * are merged
+ */
+ ret = (PyArrayObject_fields *)PyArray_NewFromDescr(
+ &PyArray_Type, dtype,
+ ndim, shape, strides, PyArray_DATA(out),
+ PyArray_FLAGS(out), NULL);
if (ret == NULL) {
return NULL;
}