Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update differential equation examples #59

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

evertrol
Copy link
Contributor

This updates most of the examples in the Ordinary Differential Equations example to be more current.

Evert Rol added 5 commits March 20, 2024 16:24
- Split into a few more cells, with Markdown comments in between

- Use `solve_ivp`, which is now the more standard suggestion for
  SciPy's ODE solver, instead of odeint

- Replace `from pylab import *` with `import matplotlib.pyplot as plt`

- Don't save an intermediate data file, nor the figure; keep
  everything directly inside the notebook
- Make it more notebook style, with separate cells

- Use `solve_ivp` instead of `odeint`

- Fix Matplotlib code (`plt.axis("normal")` doesn't work anymore) and
  use one of the new standard colormaps
- Split into more cells, with Markdown comments in between

- Use `solve_ivp`, which is now the more standard suggestion for
  SciPy's ODE solver, instead of odeint

- Replace imports with more standard usage: `import numpy as np` and
  `import matplotlib.pyplot as plt`. Replace code accordingly.
- Split across more cells. In particular, each individual figure is
  preceded by its relevant code, instead of having all figures at the
  end

- Use `solve_ivp` for one example, for comparison with `odeint`.

- Remove some unnecessary lines (Matplotlib settings)
Only very minor changes:

- Move the imports to the relevant cells (notebook style instead of
  script/program style)

- Recreate the figures in newer Matplotlib style

- Timing commands in two cells, where the minimization happens
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant