summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2021-05-06 09:55:27 -0500
committerSebastian Berg <sebastian@sipsolutions.net>2021-05-06 09:55:27 -0500
commit3c4e5af75601afeee3492d0d019c6ffe44c86d41 (patch)
treec87b1ddb300c56b6370544b6275869af32d12b2a /numpy
parent8eb83600f819b13370109496d48d0261aa289bbb (diff)
downloadnumpy-3c4e5af75601afeee3492d0d019c6ffe44c86d41.tar.gz
DOC: Updates based on Marten's review
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/umath/ufunc_type_resolution.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/numpy/core/src/umath/ufunc_type_resolution.c b/numpy/core/src/umath/ufunc_type_resolution.c
index 0be85c1c4..d41b071f4 100644
--- a/numpy/core/src/umath/ufunc_type_resolution.c
+++ b/numpy/core/src/umath/ufunc_type_resolution.c
@@ -1922,7 +1922,10 @@ type_tuple_userloop_type_resolver(PyUFuncObject *self,
for (; funcdata != NULL; funcdata = funcdata->next) {
int *orig_types = funcdata->arg_types;
- /* Copy the types into an int array for matching */
+ /*
+ * Copy the types into an int array for matching
+ * (Mostly duplicated in `type_tuple_type_resolver`)
+ */
for (j = 0; j < nop; ++j) {
if (specified_types[j] == NPY_NOTYPE) {
types[j] = orig_types[j];
@@ -2121,7 +2124,7 @@ type_tuple_type_resolver_core(PyUFuncObject *self,
/* Error */
case -1:
return -1;
- /* Found matching loop */
+ /* Found matching loop */
case 1:
return 0;
}
@@ -2130,7 +2133,10 @@ type_tuple_type_resolver_core(PyUFuncObject *self,
for (i = 0; i < self->ntypes; ++i) {
char *orig_types = self->types + i*self->nargs;
- /* Check specified types and copy into an int array for matching */
+ /*
+ * Check specified types and copy into an int array for matching
+ * (Mostly duplicated in `type_tuple_userloop_type_resolver`)
+ */
for (j = 0; j < nop; ++j) {
if (specified_types[j] == NPY_NOTYPE) {
types[j] = orig_types[j];