The introduction to this book calls it “An action packed guide using real world examples of the easy to use, high performance, free open source NumPy mathematical library”. I don’t know what “action packed” means, but the rest of the blurb is true. This book is a useful guide to people wanting to learn NumPy.

I acquired my review copy of this book shortly before delivering a course on NumPy, so the timing enabled me to compare the notes that I was preparing to the contents of the book. While my course focused on meteorology and the book takes many examples from finance, under the hood the book compared very favourably.

After the usual introductory material, the book takes the reader through installing NumPy, SciPy, Matplotlib and IPython. In case you’re not familiar, these four packages represent a “quadrivium” of tools which form the core of doing scientific work in Python.

Another feature of the installation instructions is that it give instructions for Linux, Mac and Windows machines.

Each section has some standard section headers:

  • Time for action (with a title)
  • What just happened
  • Pop quiz
  • Have a go
  • Summary

I found this approach very useful. The “Time for action” is a mini tutorial where the reader can see some examples on a particular topic (e.g. slicing and indexing arrays).

“What just happened” will then add additional explanations for the actions.

“Pop quiz” helps the reader do some self assessment of what they have just learned. It offers a multiple choice style questionnaire of some of the work covered in the previous section. There are also answers at the end of the book.

The author has used share prices and financial information to drive the examples. This would be particularly good for users who are using Python for financial work, and does not hamper people who are not interested in finance, as the examples are generally easy enough to understand.

So, after walking the reader through installing the various packages, Idris goes on to explain how to load data from CSV files. He then dicusses some basic statistics.

The next few chapters go into NumPy in more and more detail.

In chapter 8, there is a shift of gears with the focus turning away from using NumPy for finance and looking at Test Driven Development.

Chapter 9 shifts the focus to Matplotlib and give a nice overview of some of the plots that one can get.

The final two chapters look at SciPy and Pygame respectively. Each chapter does well in giving a short overview of the capabilities of the package.

Overall, the book is well written and Idris shows authority in his knowledge of the topics he discusses.

Numpy Beginner’s Guide is available from http://www.packtpub.com/numpy-mathematical-2e-beginners-guide/book

Full disclosure: I was given a free copy of the e-book for review.