Make Lorenz differential equations example compatible with Python 3

Thanks to @franktoffel for pointing this out in #7350
Thomas Kluyver 11 years ago
parent 11a9feb25f
commit db8e7428d3

@ -111,8 +111,9 @@
" ax.set_ylim((-35, 35))\n",
" ax.set_zlim((5, 55))\n",
" \n",
" def lorenz_deriv((x, y, z), t0, sigma=sigma, beta=beta, rho=rho):\n",
" def lorenz_deriv(x_y_z, t0, sigma=sigma, beta=beta, rho=rho):\n",
" \"\"\"Compute the time-derivative of a Lorentz system.\"\"\"\n",
" x, y, z = x_y_z\n",
" return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z]\n",
"\n",
" # Choose random starting points, uniformly distributed from -15 to 15\n",
@ -13428,7 +13429,12 @@
]
}
],
"metadata": {},
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
}

Loading…
Cancel
Save