Skip to content

Commit

Permalink
Extract single value from single value 1d array before passing to hst…
Browse files Browse the repository at this point in the history
…ack, as it fails on newer NumPy.
  • Loading branch information
moorepants committed Jan 19, 2024
1 parent 5af36a7 commit a9bd720
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions energy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,13 @@ are similar to prior chapters, so I leave them unexplained.

q0 = np.array([q1, np.nan, q3])

q0[1] = fsolve(lambda q2: eval_holo([q0[0], q2, q0[2]], p_vals), np.deg2rad(45.0))
q0[1] = fsolve(lambda q2: eval_holo([q0[0], q2, q0[2]], p_vals),
np.deg2rad(45.0))[0]

u0 = np.array([u1, u3])

u20 = fsolve(lambda u2: eval_vel_con(q0, [u0[0], u2, u0[1]], p_vals), np.deg2rad(0.0))
u20 = fsolve(lambda u2: eval_vel_con(q0, [u0[0], u2, u0[1]], p_vals),
np.deg2rad(0.0))[0]

x0 = np.hstack((q0, u0))

Expand Down
4 changes: 2 additions & 2 deletions install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ This website was built with the following software versions:

.. jupyter-execute::

import notebook
notebook.__version__
#import notebook
#notebook.__version__

.. jupyter-execute::

Expand Down

0 comments on commit a9bd720

Please sign in to comment.