A Review of Numpy Cookbook
A Review of Numpy Cookbook by Ivan Idris
Python has become popular in many scientific fields and one of the features that has justifiably made Python a good choice for scientific computing is the availability of the high quality Numpy library and the associated library Scipy.
Since Numpy comes with a 300+ page reference manual, I was wondering how much a cookbook would add. Quite a bit, it seems.
Traditional programming cookbooks offer recipes in the form of common tasks that are explained. Like their traditional counterparts, once we’ve learned a recipe, we can then elaborate and modify the recipe to suit our own needs and tastes. Numpy Cookbook succeeds as a cookbook, but falls somewhere between a tutorial and cookbook.
As a tutorial introduction to Numpy, it is very good. It gives a good overview of many of the things Numpy is capable of. The examples all follow a standard format which consists of a title, a short description, a “how to do it” section and a “how it works” section. Some recipes will also have a “getting ready” section which is useful when all the libraries may not have been installed.
There is a reasonable part of the text devoted to setting up an environment for running Python (not just Numpy). For example, installing and setting up iPython (an interactive shell), working with a web notebook (part of the iPython project) and installing Google App Engine and deploying NumPy code in the cloud.
While there is a good spread of examples, they do seem to be biased towards image and sound processing. It would also have been good to see some more basic recipes such as reading CSV data.
Overall, the book is quite well written and would suit someone who is just starting to learn NumPy, but who has a reasonable command of Python.
Numpy Cookbook is available from http://www.packtpub.com/numpy-for-python-cookbook/book
Full disclosure: I was given a free copy of the e-book for review.