summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-06-05 00:00:23 -0700
committerEric Wieser <wieser.eric@gmail.com>2019-06-05 00:00:23 -0700
commit5971d6099fbb410d9cb0003361c755bee598a1dc (patch)
tree48a6f55e59ff20488fc2f2bc6258dd4055d37a0b /numpy
parent40ada70d9efc903097b2ff3f968c23a7e2f14296 (diff)
downloadnumpy-5971d6099fbb410d9cb0003361c755bee598a1dc.tar.gz
MAINT: Remove pointless argument
This function had one call site, and its last argument was always part of the value passed as the first argument
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/umath/ufunc_type_resolution.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/umath/ufunc_type_resolution.c b/numpy/core/src/umath/ufunc_type_resolution.c
index 96591ba80..8207be666 100644
--- a/numpy/core/src/umath/ufunc_type_resolution.c
+++ b/numpy/core/src/umath/ufunc_type_resolution.c
@@ -94,7 +94,7 @@ raise_binary_type_reso_error(PyUFuncObject *ufunc, PyArrayObject **operands) {
*/
static int
raise_no_loop_found_error(
- PyUFuncObject *ufunc, PyArray_Descr **dtypes, npy_intp n_dtypes)
+ PyUFuncObject *ufunc, PyArray_Descr **dtypes)
{
static PyObject *exc_type = NULL;
PyObject *exc_value;
@@ -109,11 +109,11 @@ raise_no_loop_found_error(
}
/* convert dtypes to a tuple */
- dtypes_tup = PyTuple_New(n_dtypes);
+ dtypes_tup = PyTuple_New(ufunc->nargs);
if (dtypes_tup == NULL) {
return -1;
}
- for (i = 0; i < n_dtypes; ++i) {
+ for (i = 0; i < ufunc->nargs; ++i) {
Py_INCREF(dtypes[i]);
PyTuple_SET_ITEM(dtypes_tup, i, (PyObject *)dtypes[i]);
}
@@ -1472,7 +1472,7 @@ PyUFunc_DefaultLegacyInnerLoopSelector(PyUFuncObject *ufunc,
types += nargs;
}
- return raise_no_loop_found_error(ufunc, dtypes, nargs);
+ return raise_no_loop_found_error(ufunc, dtypes);
}
typedef struct {