8000 changed while loop to for loop in animate_decay.py · matplotlib/matplotlib@c421c66 · GitHub
[go: up one dir, main page]

Skip to content

Commit c421c66

Browse files
committed
changed while loop to for loop in animate_decay.py
1 parent 0bd23dc commit c421c66

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/animation/animate_decay.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ def data_gen(t=0):
1212
1313
Generates a decaying sine wave.
1414
"""
15-
count = 0
16-
while count < 1000:
15+
for count in range(1000):
1716
count += 1
1817
t += 0.1
1918
yield t, np.sin(2*np.pi*t) * np.exp(-t/10.)

0 commit comments

Comments
 (0)
0