Parameters ---------- xyz : array-like, shape (3,) Point of interest in three-dimensional space. s, r, b : float Parameters defining the Lorenz attractor. Returns ------- xyz_dot : array, shape (3,) Values of the Lorenz attractor's partial derivativ
(xyz, *, s=10, r=28, b=2.667)
| 19 | |
| 20 | |
| 21 | def lorenz(xyz, *, s=10, r=28, b=2.667): |
| 22 | """ |
| 23 | Parameters |
| 24 | ---------- |
| 25 | xyz : array-like, shape (3,) |
| 26 | Point of interest in three-dimensional space. |
| 27 | s, r, b : float |
| 28 | Parameters defining the Lorenz attractor. |
| 29 | |
| 30 | Returns |
| 31 | ------- |
| 32 | xyz_dot : array, shape (3,) |
| 33 | Values of the Lorenz attractor's partial derivatives at *xyz*. |
| 34 | """ |
| 35 | x, y, z = xyz |
| 36 | x_dot = s*(y - x) |
| 37 | y_dot = r*x - y - x*z |
| 38 | z_dot = x*y - b*z |
| 39 | return np.array([x_dot, y_dot, z_dot]) |
| 40 | |
| 41 | |
| 42 | dt = 0.01 |
no outgoing calls
no test coverage detected
searching dependent graphs…