Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b448b1f

Browse files
committed
Merge pull request #969 from cgohlke/patch-4
Fix lorenz_attractor example on Python 3
2 parents 83471aa + 89e5947 commit b448b1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/mplot3d/lorenz_attractor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def lorenz(x, y, z, s=10, r=28, b=2.667) :
3030
xs[0], ys[0], zs[0] = (0., 1., 1.05)
3131

3232
# Stepping through "time".
33-
for i in xrange(stepCnt) :
33+
for i in range(stepCnt) :
3434
# Derivatives of the X, Y, Z state
3535
x_dot, y_dot, z_dot = lorenz(xs[i], ys[i], zs[i])
3636
xs[i + 1] = xs[i] + (x_dot * dt)

0 commit comments

Comments
 (0)