summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/src/multiarray/multiarraymodule_onefile.c5
-rw-r--r--numpy/core/src/multiarray/reduction.c1
-rw-r--r--numpy/core/src/multiarray/shape.c6
-rw-r--r--numpy/core/src/umath/ufunc_object.c1
4 files changed, 9 insertions, 4 deletions
diff --git a/numpy/core/src/multiarray/multiarraymodule_onefile.c b/numpy/core/src/multiarray/multiarraymodule_onefile.c
index 143a011eb..655800631 100644
--- a/numpy/core/src/multiarray/multiarraymodule_onefile.c
+++ b/numpy/core/src/multiarray/multiarraymodule_onefile.c
@@ -45,7 +45,10 @@
#include "lowlevel_strided_loops.c"
#include "dtype_transfer.c"
#include "einsum.c"
-
+#include "array_assign.c"
+#include "array_assign_scalar.c"
+#include "array_assign_array.c"
+#include "reduction.c"
#include "na_mask.c"
#include "na_singleton.c"
diff --git a/numpy/core/src/multiarray/reduction.c b/numpy/core/src/multiarray/reduction.c
index f305b8e06..78caa3674 100644
--- a/numpy/core/src/multiarray/reduction.c
+++ b/numpy/core/src/multiarray/reduction.c
@@ -548,6 +548,7 @@ PyArray_ReduceWrapper(PyArrayObject *operand, PyArrayObject *out,
flags = NPY_ITER_BUFFERED |
NPY_ITER_EXTERNAL_LOOP |
+ NPY_ITER_GROWINNER |
NPY_ITER_DONT_NEGATE_STRIDES |
NPY_ITER_ZEROSIZE_OK |
NPY_ITER_REDUCE_OK |
diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c
index cbbdbea75..9b696af53 100644
--- a/numpy/core/src/multiarray/shape.c
+++ b/numpy/core/src/multiarray/shape.c
@@ -983,7 +983,7 @@ PyArray_CreateSortedStridePerm(int ndim, npy_intp *shape,
}
static NPY_INLINE npy_intp
-intp_abs(npy_intp x)
+s_intp_abs(npy_intp x)
{
return (x < 0) ? -x : x;
}
@@ -1030,8 +1030,8 @@ PyArray_CreateMultiSortedStridePerm(int narrays, PyArrayObject **arrays,
for (iarrays = 0; iarrays < narrays; ++iarrays) {
if (PyArray_SHAPE(arrays[iarrays])[j0] != 1 &&
PyArray_SHAPE(arrays[iarrays])[j1] != 1) {
- if (intp_abs(PyArray_STRIDES(arrays[iarrays])[j0]) <=
- intp_abs(PyArray_STRIDES(arrays[iarrays])[j1])) {
+ if (s_intp_abs(PyArray_STRIDES(arrays[iarrays])[j0]) <=
+ s_intp_abs(PyArray_STRIDES(arrays[iarrays])[j1])) {
/*
* Set swap even if it's not ambiguous already,
* because in the case of conflicts between
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index c99ce78c2..8b9210dcb 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -2800,6 +2800,7 @@ PyUFunc_Reduce(PyUFuncObject *self, PyArrayObject *arr, PyArrayObject *out,
flags = NPY_ITER_BUFFERED |
NPY_ITER_EXTERNAL_LOOP |
+ NPY_ITER_GROWINNER |
NPY_ITER_DONT_NEGATE_STRIDES |
NPY_ITER_ZEROSIZE_OK |
NPY_ITER_REDUCE_OK |