We are pleased to announce the second edition of A Student’s Guide to Python for Physical Modeling!
The book will be available in early August, in time for fall classes.
We have updated the book to reflect changes in the language, and we have added new material on methods that have become more prominent in scientific programming in recent years — such as data science and version control. The second edition is about 70 pages longer than the updated edition. However, we maintained the concise, hands-on approach of earlier editions and worked diligently to make the text clear and easy to follow.
New Material
Our first task was to bring everything up to date so that readers can build a working Python environment from scratch. Everything from installation instructions to screenshots have been brought up to date.
We also developed and tested all code with the latest version of Python: Python 3.9. We made a deliberate effort to use simple constructs and standard libraries, so the code samples run with earlier versions of Python, too.
(The “latest version” of an open-source software package is a quickly moving target. With Python’s new release schedule, any version number in print is guaranteed to be out of date in less than a year! If you want to explore the latest changes to the Python language, you can read about what’s new..)
The bulk of the new material in the second edition comes in two new chapters.
Chapter 10 — Advanced Techniques introduces several Python programming tools that are advanced for someone new to computer programming, but are also indispensable to scientific computing:
- Dictionaries and generators
- Tools for data science and machine learning: pandas and scikit-learn (a very brief introduction)
- Symbolic computing with SymPy (greatly expanded coverage from earlier editions, with a guided investigation of the first passage problem)
- Python classes (a tutorial in writing classes to study random walks in 1, 2, or 3 dimensions and on a variety of lattices)
Appendix B — Command Line Tools introduces readers to working at the command line: a UNIX/Linux shell, a macOS terminal, or the Anaconda Prompt in Windows. It also introduces Git for version control. (You can now obtain the entire repository of code samples from GitHub!)
- Introduction to navigating the file system from the command line
- Creating, moving, and deleting files and directories
- Using a text editor from the command line
- Version control with Git
There are many other updates and additions throughout the rest of the text, too.
- Raw strings (convenient for LaTeX)
- Comparison of
plt.subplot
andplt.subplots
- Heat maps with
pcolormesh
- Complex root finding with
fsolve
- Solving ODE’s with
solve_ivp
We have also added several new code samples and “Your Turn” exercises — with solutions — so readers can try out the new techniques.
Thanks to the many readers who provided helpful comments and suggestions on earlier editions of the book. We look forward to your feedback on the second edition!
Comments