Learning NumPy Array

I recently got a review copy of Ivan Idris’ “Learning NumPy Array” from Pact Publishing. I have read his earlier book “NumPy Cookbook” and found that useful, so I had my expectations quite high when I started.

The book is not huge brick, but still has enough content for almost 150 pages. As usual, first chapter is dedicated for installing NumPy, Matplotlib, SciPy, and IPython in various operating systems. While the information is good, I think just pointing to online resources would have been sufficient.

The second chapter is reserved for NumPy basics. This is where things are starting to get interesting if you haven’t worked with NumPy and arrays before. It is a good idea to read this chapter carefully, if you aren’t familiar with NumPy. Later chapters are built on top of the foundation laid here and are easier to understand when you understand the basics.

Starting from the 3rd chapter, the book dives into details of NumPy arrays and tools that are available to work with them. I like the fact the each subsequent chapter is built on a theme (basic data analysis, simple predictive analytics and signal processing techniques) with concrete examples. Mostly examples are built around various kinds of weather data, but there’s a little bit of stocks thrown into the mix too. Mathematical foundations are only explained in briefly because of the limited amount of the pages the book has. There’s enough detail for reader to understand what is going on and more information is readily available on internet.

Near the end of the book, there is short chapter about profiling, debugging and testing. Especially the part about testing I found very brief and not that useful, but this is book about NumPy after all and not about testing. This is probably the weakest part of the book and could have been left out. The pages used for this chapter could have been used to explain NumPy in more detail.

The last chapter of the book touches other related libraries briefly. It’s good to know how NumPy relates to for example SciPy and scikit-learn.

All in all I found the book very enjoyable to read and easy to follow. Sometimes graphics was getting a bit on the way, like when textual output was shown as an image of text instead of text (so font differed just slightly or the output had different coloured background). The author is already working on the next book, called “Learning Python Data Analysis” which also sounds quite interesting and is expected to come out 2015.

NumPy Beginner’s Guide – Second Edition

I got a review copy of NumPy Beginner’s Guide – Second Edition from Packt Publishing. The book is relatively thick, a bit over 300 pages and packed with content.

As usual with Packt books, it starts by introducing the tools and giving detailed instructions on installing them, before diving into actual subject. The book starts easy, teaching how to create arrays and manipulate vectors. Soon more concepts are introduced starting from slicing and ending to SciPy. There is even a chapter about testing, which I found especially interesting to read.

I liked how there are pop quizes to help the reader to check if he understood what he just read. They aren’t really hard, but still quite fun. Layout of the book is clear and makes the books easy to read. There are plenty of examples and graphs in the book that help to explain the concepts.

The book is very suited for a person who is not familiar with NumPy and wants to learn it. It covers lot of ground in sufficient detail. I felt that reading this book was good investment of time and enjoyed it.

NumPy Cookbook

Recently I got a copy of NumPy Cookbook to read and review from Packt Publishing and I must say that I was positively surprised. Focus is of course NumPy, but the book touches SciPy too.

The book is laid out nicely and is generally easy to read and digest. I really loved how instead of doing examples as Python programs or even interpreter commands, they chose to use IPython, which is like regular Python shell, but in steroids (as my colleague eloquently put it). IPython makes experimenting and sharing the experiments with others fun and easy.

My only experience with NumPy before was from time when I was writing a simple ray tracer with Python. I knew that the library had lot to offer besides simple things I was doing, but did not really have good way to dig in into it. This book has over 70 different ways of using NumPy, SciPy, PIL among other libraries that can be used to analyze and manipulate data. It also briefly touches subject of quality assurance, which of course is very close to my heart.

Focus is all the time in showing how to do things with brief examples. This suited very well for me, since I’m more about learning by doing than learning by reading type of person. While the book is relatively thin (around 200 pages + index), it has quite lot in it. For seasoned NumPy / SciPy user it probably does not offer that much new, but for a person not familiar with the libraries it offers a fast way getting started.