Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Learning scientific programming with Python
Hill C., Cambridge University Press, New York, NY, 2016. 457 pp. Type: Book (978-1-107428-22-5)
Date Reviewed: Oct 10 2016

Python has become a popular language in various domains, including scientific programming. Many well-documented packages are freely available, and many enthusiastic programmers are willing to share their knowledge and help novices. In this book, Hill offers an excellent, well-designed, and well-executed introductory programming book aimed at a specific audience: scientists and engineers with no prior programming experience. The book will help the reader learn Python 3 and the NumPy, SciPy, and matplot libraries.

The book contains nine chapters and one appendix. In addition to questions, each chapter is richly accompanied by a wealth of outstanding examples, exercises, and problems that range over a variety of disciplines: physics, chemistry, biology, biochemistry, computer science, mathematics, astronomy, statistics, computational linguistics, and economics. Examples are illustrated with clear code. Exercises and problems are described clearly enough that students should be able to work on them even if they are not intimately familiar with the subject matter. Hill also includes suggestions for further reading and references to additional data and information resources available on the web. Some sections, such as those dealing with linear algebra, assume familiarity with the concepts and terminology involved.

The book is introduced in chapter 1, “Introduction,” rather than in a preface. This chapter also tells the reader how to install Python and how to run it from the shell command line. This method is used until IPython is introduced in chapter 5.

Python is covered pretty extensively (no introductory book could cover it thoroughly) in chapters 2, “The Core Python Language I,” and 4, “The Core Python Language II.”

Graphics are covered in two chapters. Chapter 3, “Interlude: Simple Plotting with pylab,” covers line plots, scatter plots, labels, legends, basic customization, polar plots, histograms, and multiple axes. Chapter 7, “Matplotlib,” includes matplotlib basics, contour plots, heatmaps, and 3D plots. The book’s website (http://scipython.com/) shows some impressive plots and diagrams in full color.

Chapter 5, “IPython and IPython Notebook,” serves as both an introduction to these products and a justification for their use. Hill notes that IPython Notebook has been incorporated into Jupyter, a web application that allows for the creating and sharing of documents that contain live code, equations, visualizations, and explanatory text; he treats IPython Notebook, however, as an independent product.

Chapters 6 and 8 deal with scientific numeric packages. Chapter 6, “NumPy,” long and somewhat intense, is a great introduction to this product. The chapter covers a wide territory. It includes arrays and using arrays for matrix operations. The NumPy matrix class is also covered separately, but concludes with the observation that matrix objects do not have much to command them over regular NumPy arrays (which are not the same as Python arrays). Other topics covered in chapter 6 include: statistics, polynomials, random numbers, the binomial and Poisson distributions, random sampling, and 1D and 2D fast Fourier transforms.

Chapter 8, “SciPy,” covers physical constants, special functions, integration, ordinary differential equations, interpolation, optimization, data fitting, and root-finding.

Chapter 9, “General Scientific Programming,” contains three sections. The first two sections deal with floating-point arithmetic and the stability and conditioning of problems. These sections introduce the challenges the scientific programmer will inevitably face, but they obviously cannot cover the subject at the level of a course in numerical analysis. In addition to the references Hill mentions for further reading here, I would also suggest William Kahan’s work [1]. The last section of this chapter offers suggestions concerning comments, programming style, editors, version control, and unit testing.

Appendix A contains solutions to selected questions.

The book’s website (http://scipython.com/) contains some examples and exercises from the book, plus additional science and engineering examples and exercises. Solutions are available to instructors from the publisher’s website (http://www.cambridge.org/fr/academic/subjects/physics/computational-science-and-modelling/learning-scientific-programming-python?format=PB).

Clearly, the book could be used to teach Python to science and engineering students, but I encourage instructors to consider using it to teach programming to liberal arts students as well. An educated, well-rounded person should be aware of the concerns and methods of a variety of scientific disciplines that are crucial to the modern world. Helpful background knowledge would include trigonometry, complex numbers, calculus, differential equations, and matrices. But enough material is accessible to the diligent reader at the freshman or sophomore level so that an instructor who carefully selects portions of the book can offer an exciting course--or at least offer it once and see how well it works out. Many students will find the exercises and problems extremely interesting, and that may well awaken the desire to learn more about these subjects. The book would be a great adjunct to a course in science for nonscientists, or such a course could be tailored around this book.

Throughout, the writing is extremely clear. This book deserves a very high recommendation.

Reviewer:  Edgar R. Chavez Review #: CR144826 (1701-0013)
1) Kahan, W. What has the volume of a tetrahedron to do with computer programming languages? https://people.eecs.berkeley.edu/~wkahan/VtetLang.pdf (09/01/2016).
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Python (D.3.2 ... )
 
 
Physical Sciences And Engineering (J.2 )
 
 
Reference (A.2 )
 
Would you recommend this review?
yes
no
Other reviews under "Python": Date
Practical Python
Hetland M., APress, LP, 2002.  648, Type: Book (9781590590065)
Mar 28 2003
Python programming: an introduction to computer science
Zelle J., Franklin B, 2003. Type: Book (9781887902991)
Dec 2 2004
Foundations of Python network programming
Goerzen J., APress, LP, Berkeley, CA, 2004.  512, Type: Book (9781590593714)
Dec 26 2004
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy