summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2022-11-16 20:15:00 +0100
committerSebastian Berg <sebastianb@nvidia.com>2023-01-20 15:28:48 +0100
commitec58e19dc3b10c43cabe027861e2a451bc0e3531 (patch)
tree227f076ae8b3c5e24a6ba6faa2b31fea00ea9e92 /numpy/core/src
parent07916b922a777130756b948a26d99328e0c56783 (diff)
downloadnumpy-ec58e19dc3b10c43cabe027861e2a451bc0e3531.tar.gz
MAINT: Rename PyUFunc_GetIDentity to PyUFunc_GetDefaultIdentity
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/umath/legacy_array_method.c5
-rw-r--r--numpy/core/src/umath/ufunc_object.c4
-rw-r--r--numpy/core/src/umath/ufunc_object.h2
3 files changed, 6 insertions, 5 deletions
diff --git a/numpy/core/src/umath/legacy_array_method.c b/numpy/core/src/umath/legacy_array_method.c
index 81c7585d6..f507a0806 100644
--- a/numpy/core/src/umath/legacy_array_method.c
+++ b/numpy/core/src/umath/legacy_array_method.c
@@ -274,7 +274,7 @@ get_initial_from_ufunc(
return -1;
}
npy_bool reorderable;
- PyObject *identity_obj = PyUFunc_GetIdentity(
+ PyObject *identity_obj = PyUFunc_GetDefaultIdentity(
(PyUFuncObject *)context->caller, &reorderable);
if (identity_obj == NULL) {
return -1;
@@ -366,7 +366,8 @@ PyArray_NewLegacyWrappingArrayMethod(PyUFuncObject *ufunc,
get_reduction_intial_function *get_reduction_intial = NULL;
if (ufunc->nin == 2 && ufunc->nout == 1) {
npy_bool reorderable = NPY_FALSE;
- PyObject *identity_obj = PyUFunc_GetIdentity(ufunc, &reorderable);
+ PyObject *identity_obj = PyUFunc_GetDefaultIdentity(
+ ufunc, &reorderable);
if (identity_obj == NULL) {
return NULL;
}
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index e9ac37820..eac09389e 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -2093,7 +2093,7 @@ _get_coredim_sizes(PyUFuncObject *ufunc, PyArrayObject **op,
* constructing one each time
*/
NPY_NO_EXPORT PyObject *
-PyUFunc_GetIdentity(PyUFuncObject *ufunc, npy_bool *reorderable)
+PyUFunc_GetDefaultIdentity(PyUFuncObject *ufunc, npy_bool *reorderable)
{
switch(ufunc->identity) {
case PyUFunc_One:
@@ -6974,7 +6974,7 @@ static PyObject *
ufunc_get_identity(PyUFuncObject *ufunc, void *NPY_UNUSED(ignored))
{
npy_bool reorderable;
- return PyUFunc_GetIdentity(ufunc, &reorderable);
+ return PyUFunc_GetDefaultIdentity(ufunc, &reorderable);
}
static PyObject *
diff --git a/numpy/core/src/umath/ufunc_object.h b/numpy/core/src/umath/ufunc_object.h
index ea18b7246..45444dac4 100644
--- a/numpy/core/src/umath/ufunc_object.h
+++ b/numpy/core/src/umath/ufunc_object.h
@@ -13,7 +13,7 @@ NPY_NO_EXPORT const char*
ufunc_get_name_cstr(PyUFuncObject *ufunc);
NPY_NO_EXPORT PyObject *
-PyUFunc_GetIdentity(PyUFuncObject *ufunc, npy_bool *reorderable);
+PyUFunc_GetDefaultIdentity(PyUFuncObject *ufunc, npy_bool *reorderable);
/* strings from umathmodule.c that are interned on umath import */
NPY_VISIBILITY_HIDDEN extern PyObject *npy_um_str_array_ufunc;