diff options
author | Mike Taves <mwtoews@gmail.com> | 2020-01-28 13:12:38 +1300 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2020-01-27 16:12:38 -0800 |
commit | f398a0df8a2105b2fdeaeab54505451169b0a869 (patch) | |
tree | fe041dbec09eb1a303f7b027cc98e7423476de3f /numpy/lib/arrayterator.py | |
parent | 6d889e7eca0f7ae6d640c380bd0b604e6530f049 (diff) | |
download | numpy-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/lib/arrayterator.py')
-rw-r--r-- | numpy/lib/arrayterator.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/lib/arrayterator.py b/numpy/lib/arrayterator.py index 15b0f8aa9..924092995 100644 --- a/numpy/lib/arrayterator.py +++ b/numpy/lib/arrayterator.py @@ -161,8 +161,7 @@ class Arrayterator: """ for block in self: - for value in block.flat: - yield value + yield from block.flat @property def shape(self): |