Preface
The idea of writing Mastering SciPy arose but 2 months after publishing Learning SciPy for Numerical and Scientific Computing. During a presentation of that book at the University of South Carolina, I had the privilege of speaking about its contents to a heterogeneous audience of engineers, scientists, and students, each of them with very different research problems and their own set of preferred computational resources. In the weeks following that presentation, I helped a few professionals transition to a SciPy-based environment. During those sessions, we discussed how SciPy is, under the hood, the same set of algorithms (and often the same code) that they were already using. We experimented with some of their examples and systematically obtained comparable performance. We immediately saw the obvious benefit of a common environment based upon a robust scripting language. Through the SciPy stack, we discovered an easier way to communicate and share our results with colleagues, students, or employers. In all cases, the switch to the SciPy stack provided a faster setup for our groups, where newcomers could get up to speed quickly.
Everybody involved in the process went from novice to advanced user, and finally mastered the SciPy stack in no time. In most cases, the scientific background of the individuals with whom I worked made the transition seamless. The process toward mastering materialized when they were able to contrast the theory behind their research with the solutions offered. The aha moment always happened while replicating some of their experiments with a careful guidance and explanation of the process.
That is precisely the philosophy behind this book. I invite you to participate in similar sessions. Each chapter has been envisioned as a conversation with an individual with certain scientific needs expressed as numerical computations. Together, we discover relevant examples—the different possible ways to solve those problems, the theory behind them, and the pros and cons of each route.
The process of writing followed a similar path to obtain an engaging collection of examples. I entered into conversations with colleagues in several different fields. Each section clearly reflects these exchanges. This was crucial while engaged in the production of the most challenging chapters—the last four. To ensure the same quality throughout the book, always trying to commit to a rigorous set of standards, these chapters took much longer to be completed to satisfaction. Special mentions go to Aaron Dutle at NASA Langley Research Center, who helped shape parts of the chapter on computational geometry, and Parsa Bakhtary, a data analyst at Facebook, who inspired many of the techniques in the chapter on applications of statistical computing to data analysis.
It was an amazing journey that helped deepen my understanding of numerical methods, broadened my perspective in problem solving, and strengthened my scientific maturity. It is my wish that it has the same impact on you.