@@ -115,7 +115,7 @@ static PyObject *
115
115
prepare_input_arguments_for_outer (PyObject * args , PyUFuncObject * ufunc );
116
116
117
117
static int
118
- resolve_descriptors (int nop , int nin ,
118
+ resolve_descriptors (int nop ,
119
119
PyUFuncObject * ufunc , PyArrayMethodObject * ufuncimpl ,
120
120
PyArrayObject * operands [], PyArray_Descr * dtypes [],
121
121
PyArray_DTypeMeta * signature [], PyObject * inputs_tup ,
@@ -2804,7 +2804,7 @@ reducelike_promote_and_resolve(PyUFuncObject *ufunc,
2804
2804
* casting safety could in principle be set to the default same-kind.
2805
2805
* (although this should possibly happen through a deprecation)
2806
2806
*/
2807
- if (resolve_descriptors (3 , 2 , ufunc , ufuncimpl ,
2807
+ if (resolve_descriptors (3 , ufunc , ufuncimpl ,
2808
2808
ops , out_descrs , signature , NULL , casting ) < 0 ) {
2809
2809
return NULL ;
2810
2810
}
@@ -4476,7 +4476,7 @@ _get_fixed_signature(PyUFuncObject *ufunc,
4476
4476
* need to "cast" to string first).
4477
4477
*/
4478
4478
static int
4479
- resolve_descriptors (int nop , int nin ,
4479
+ resolve_descriptors (int nop ,
4480
4480
PyUFuncObject * ufunc , PyArrayMethodObject * ufuncimpl ,
4481
4481
PyArrayObject * operands [], PyArray_Descr * dtypes [],
4482
4482
PyArray_DTypeMeta * signature [], PyObject * inputs_tup ,
@@ -4495,6 +4495,7 @@ resolve_descriptors(int nop, int nin,
4495
4495
* 2. Can in principle customize `PyArray_CastDescrToDType()`
4496
4496
* (also because we want to avoid calling it for the scalars).
4497
4497
*/
4498
+ int nin = ufunc -> nin ;
4498
4499
PyObject * input_scalars [NPY_MAXARGS ];
4499
4500
for (int i = 0 ; i < nop ; i ++ ) {
4500
4501
if (operands [i ] == NULL ) {
@@ -4905,7 +4906,7 @@ ufunc_generic_fastcall(PyUFuncObject *ufunc,
4905
4906
}
4906
4907
4907
4908
/* Find the correct descriptors for the operation */
4908
- if (resolve_descriptors (nop , nin , ufunc , ufuncimpl ,
4909
+ if (resolve_descriptors (nop , ufunc , ufuncimpl ,
4909
4910
operands , operation_descrs , signature , full_args .in , casting ) < 0 ) {
4910
4911
goto fail ;
4911
4912
}
@@ -6277,7 +6278,7 @@ ufunc_at(PyUFuncObject *ufunc, PyObject *args)
6277
6278
}
6278
6279
6279
6280
/* Find the correct operation_descrs for the operation */
6280
- int resolve_result = resolve_descriptors (nop , ufunc -> nin , ufunc , ufuncimpl ,
6281
+ int resolve_result = resolve_descriptors (nop , ufunc , ufuncimpl ,
6281
6282
tmp_operands , operation_descrs , signature , NULL , NPY_UNSAFE_CASTING );
6282
6283
for (int i = 0 ; i < 3 ; i ++ ) {
6283
6284
Py_XDECREF (signature [i ]);
@@ -6606,7 +6607,7 @@ py_resolve_dtypes_generic(PyUFuncObject *ufunc, npy_bool return_context,
6606
6607
}
6607
6608
6608
6609
/* Find the correct descriptors for the operation */
6609
- if (resolve_descriptors (ufunc -> nargs , ufunc -> nin , ufunc , ufuncimpl ,
6610
+ if (resolve_descriptors (ufunc -> nargs , ufunc , ufuncimpl ,
6610
6611
dummy_arrays , operation_descrs , signature ,
6611
6612
NULL , casting ) < 0 ) {
6612
6613
goto finish ;
0 commit comments