summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/src/umath/ufunc_object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index 7548ffb87..aacf3f780 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -1838,6 +1838,10 @@ make_full_arg_tuple(
}
}
+ /* No outputs in kwargs; if also none in args, we're done */
+ if (nargs == nin) {
+ return 0;
+ }
/* copy across positional output arguments, adding trailing Nones */
full_args->out = PyTuple_New(nout);
if (full_args->out == NULL) {