summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorMike Taves <mwtoews@gmail.com>2020-01-28 13:12:38 +1300
committerSebastian Berg <sebastian@sipsolutions.net>2020-01-27 16:12:38 -0800
commitf398a0df8a2105b2fdeaeab54505451169b0a869 (patch)
treefe041dbec09eb1a303f7b027cc98e7423476de3f /numpy/core/fromnumeric.py
parent6d889e7eca0f7ae6d640c380bd0b604e6530f049 (diff)
downloadnumpy-f398a0df8a2105b2fdeaeab54505451169b0a869.tar.gz
STY: use 'yield from <expr>' for simple cases (#15444)
This PR uses simple cases of PEP 380 to rewrite: for v in g: yield v into: yield from <expr>
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 46dd961d8..f3d3b8a92 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -300,8 +300,7 @@ def reshape(a, newshape, order='C'):
def _choose_dispatcher(a, choices, out=None, mode=None):
yield a
- for c in choices:
- yield c
+ yield from choices
yield out