From f5090701de7181d5cab7b7b0c7eec029c00356db Mon Sep 17 00:00:00 2001 From: Michael McCann Date: Fri, 29 Oct 2021 10:42:13 -0600 Subject: DOC: fix typo in example, throws ValueError if return statement is not inside the with: --- numpy/core/_add_newdocs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy') diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index dbbb43009..d12e917e3 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -328,7 +328,7 @@ add_newdoc('numpy.core', 'nditer', ... with it: ... for (a, b, c) in it: ... addop(a, b, out=c) - ... return it.operands[2] + ... return it.operands[2] Here is the same function, but following the C-style pattern: -- cgit v1.2.1 From 87c6199494abc01c863422a7965a1033f0a53138 Mon Sep 17 00:00:00 2001 From: Mike McCann <57153404+Michael-T-McCann@users.noreply.github.com> Date: Fri, 29 Oct 2021 10:29:47 -0700 Subject: Update numpy/core/_add_newdocs.py Co-authored-by: Warren Weckesser --- numpy/core/_add_newdocs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy') diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index d12e917e3..c8a24db0c 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -328,7 +328,7 @@ add_newdoc('numpy.core', 'nditer', ... with it: ... for (a, b, c) in it: ... addop(a, b, out=c) - ... return it.operands[2] + ... return it.operands[2] Here is the same function, but following the C-style pattern: -- cgit v1.2.1