diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-06-02 17:44:28 -0400 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-06-02 17:44:28 -0400 |
commit | b9e62d146b3a4ad31998bb254f7ee2783909cf58 (patch) | |
tree | 0c6be9311f88b6d8e35a4c86b4a53ac95e669938 /numpy/core/src/umath | |
parent | 07dee9e1ddd81f8bc2d213c54e4e9920d7e7acf3 (diff) | |
download | numpy-b9e62d146b3a4ad31998bb254f7ee2783909cf58.tar.gz |
MAINT: ensure we do not create unnecessary tuples for outputs
Small thing missed in gh-10919.
Diffstat (limited to 'numpy/core/src/umath')
-rw-r--r-- | numpy/core/src/umath/ufunc_object.c | 4 |
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) { |