##// END OF EJS Templates
Make Lorenz differential equations example compatible with Python 3...
Thomas Kluyver -
Show More
@@ -111,8 +111,9 b''
111 " ax.set_ylim((-35, 35))\n",
111 " ax.set_ylim((-35, 35))\n",
112 " ax.set_zlim((5, 55))\n",
112 " ax.set_zlim((5, 55))\n",
113 " \n",
113 " \n",
114 " def lorenz_deriv((x, y, z), t0, sigma=sigma, beta=beta, rho=rho):\n",
114 " def lorenz_deriv(x_y_z, t0, sigma=sigma, beta=beta, rho=rho):\n",
115 " \"\"\"Compute the time-derivative of a Lorentz system.\"\"\"\n",
115 " \"\"\"Compute the time-derivative of a Lorentz system.\"\"\"\n",
116 " x, y, z = x_y_z\n",
116 " return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z]\n",
117 " return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z]\n",
117 "\n",
118 "\n",
118 " # Choose random starting points, uniformly distributed from -15 to 15\n",
119 " # Choose random starting points, uniformly distributed from -15 to 15\n",
@@ -13428,7 +13429,12 b''
13428 ]
13429 ]
13429 }
13430 }
13430 ],
13431 ],
13431 "metadata": {},
13432 "metadata": {
13433 "kernelspec": {
13434 "display_name": "Python 3",
13435 "name": "python3"
13436 }
13437 },
13432 "nbformat": 4,
13438 "nbformat": 4,
13433 "nbformat_minor": 0
13439 "nbformat_minor": 0
13434 } No newline at end of file
13440 }
General Comments 0
You need to be logged in to leave comments. Login now