Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Best of 2016 Recommended by Editor Recommended by Reviewer Recommended by Reader
Python for scientists (2nd ed.)
Stewart J., Cambridge University Press, New York, NY, 2017. 270 pp.  Type: Book (978-1-316641-23-1)
Date Reviewed: Feb 22 2018

Consider the following tease lines that one might choose to begin a book review with: “When I first scanned the contents of this book, I was completely overwhelmed”; “The title of this book is somewhat deceptive”; “This book may well become a classic”; or, “If this book fully explained all the topics it addresses, it would be 5,000 pages long.” I list them here because they all apply to Python for scientists, and I could not decide which one I liked best.

First, a short survey of the chapters is needed to understand the contents of the book. Chapter 1 provides a justification for using Python for scientific computing. It discusses the tradeoffs between open-source and commercial scientific software, and makes a convincing argument for Python (and, of course, its libraries). Chapter 2 introduces iPython. It begins with tab completion and ends with a recursive function to determine the greatest common divisor of two integers. If you are looking for an iPython tutorial, you will have to look elsewhere. In fact, that general observation applies to the entire book. If you are looking for an introduction to these topics or a tutorial, you will have to look elsewhere. Chapter 3, “A Short Python Tutorial,” begins with objects and goes on to discuss namespaces, list slicing, and classes. Again, not introductory topics, but nicely done nonetheless. Chapter 4 introduces NumPy, covering arrays and matrices, and ending up with linear algebra. If you are not already familiar with NumPy arrays and linear algebra, then you have some homework to do before mastering this chapter. Chapter 5 covers Matplotlib for two-dimensional data visualization. Chapter 6 continues with multidimensional graphics. In chapter 7, the demand for a solid mathematical background is cranked up a notch as it introduces SymPy and its use for ordinary differential equations. Chapter 8 continues with advanced differential equations before moving on to partial differential equations in chapter 9. If the last time you saw a partial differential equation was in a sophomore calculus class, then the final chapters (from chapter 7 on) are probably beyond your reach. The book wraps up with a case study of multigrid. Up until the case study, I understood, generally, what the math was about, although my understanding is a bit rusty and would require some serious review to come up to speed again. Yet it was still possible for me to see the connections between the math, its application, and the Python examples.

Normally, I prefer books that provide an adequate treatment of their topics at an appropriate level for the target audience. I don’t like books that I have to put down, so I can go do some homework before coming back to struggle with it some more. However, I would make an exception for this book. The author said:

unlike many books that set out to “teach” a language, this one is not just a brisk trot through the reference manuals. Python has many powerful but unfamiliar facets, and these need more explanations than the familiar ones. In particular if you encounter in this text a reference to the “beginner” or the “unwary,” it signifies a point which is not made clear in the documentation and has caught out this author at least once.

The intent of the author is clear and this book delivers on that promise. You really can’t demand any more than that.

The book is well written and well edited. (It is a 2nd edition, so you would expect the typographical errors to be gone.) There are lots of examples and high-quality graphics (mainly in the chapters involving some sort of data visualization), but no handholding. You must be serious about Python and advanced quantitative techniques used in scientific modeling and research, or this book will be too much of a challenge.

Let’s return for a moment to the tease lines that I started the review with. “When I first scanned the contents of this book, I was completely overwhelmed.” This is true. I am not easily intimidated by a book. But the contents of this book are very advanced in terms of mathematics, programming, and scientific applications. Further, the range of applications is such that one might be an expert in one area while almost ignorant in another. A fair review would require a specialized team of reviewers. And indeed, that was the case with the referees. “The title of this book is somewhat deceptive.” I felt that Really advanced Python for really advanced quantitatively oriented scientists might have been a little more accurate. “This book may well become a classic.” Books on programming languages rarely last more than a few years. However, there are some notable examples such as The C programming language by Kernighan and Ritchie [1], which has lasted for decades. Python for scientists has the potential for such longevity as long as the underlying Python libraries do not change too dramatically. Finally, “If this book fully explained all the topics it addresses, it would be 5,000 pages long.” If this book fully explained every topic it addresses, it would have to provide tutorials on intermediate and advanced Python, mathematical topics from linear algebra to partial differential equations, and scientific applications of the advanced math and the advanced programming. It could easily become a dozen books or one massively long book.

The author said, “My editor and some referees suggested that I should devote the second half of the book to problems in a particular field. That would have led to a series of books ‘Python for Biochemists,’ ‘Python for Crystallographers,’ … all with a common first half.” Yes, and that first half would have required a few tutorial volumes on Python, iPython, and Python libraries, as well as tutorials on the advanced math and application areas.

There are two obvious target audiences for this book. First, it would serve as a textbook for a seminar (or a series of seminars) for doctoral students in preparation for computationally intensive scientific modeling or data analysis. Second, it would be of interest to any working scientists who wish they’d had such a seminar. It is an amazing book. But the pool of potential readers is somewhat limited.

More reviews about this item: Amazon, Goodreads

Reviewer:  J. M. Artz Review #: CR145876
1) Kernighan, B. W.; Ritchie, D. M. The C programming language (2nd ed.). Prentice Hall, Upper Saddle River, NJ, 1988.
Bookmark and Share
  Reviewer Selected
Editor Recommended
Featured Reviewer
Python (D.3.2 ... )
Would you recommend this review?
Other reviews under "Python": Date
Beginning Python: from novice to professional (3rd ed.)
Hetland M.,  Apress, New York, NY, 2017. 527 pp. Type: Book (978-1-484200-29-2)
Feb 1 2018
Python for graph and network analysis
Al-Taie M., Kadry S.,  Springer International Publishing, New York, NY, 2017. 203 pp. Type: Book (978-3-319530-03-1)
Nov 6 2017
Advanced machine learning with Python
Hearty J.,  Packt Publishing, Birmingham, UK, 2016. 278 pp. Type: Book (978-1-784398-63-7)
Sep 22 2017

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright © 2000-2018 ThinkLoud, Inc.
Terms of Use
| Privacy Policy