Jump to ratings and reviews
Rate this book

Learning NumPy Array

Rate this book
Supercharge your scientific Python computations by understanding how to use the NumPy library effectively This book is for programmers, scientists, or engineers, who have basic Python knowledge and would like to be able to do numerical computations with Python. NumPy is an extension of Python, which provides highly optimized arrays and numerical operations. NumPy replaces a lot of the functionality of Matlab and Mathematica specifically vectorized operations, but in contrast to those products is free and open source. In today's world of science and technology, it is all about speed and flexibility. This book will teach you about NumPy, a leading scientific computing library. This book enables you to write readable, efficient, and fast code, which is closely associated to the language of mathematics. Save thousands of dollars on expensive software, while keeping all the flexibility and power of your favorite programming language. You will learn about installing and using NumPy and related concepts. At the end of the book we will explore related scientific computing projects. This book will give you a solid foundation in NumPy arrays and universal functions. Learning NumPy Array will help you be productive with NumPy and write clean and fast code.

164 pages, Paperback

First published January 1, 2014

2 people are currently reading
265 people want to read

About the author

Ivan Idris

14 books26 followers
Ivan Idris is the author of NumPy Beginner's Guide and NumPy Cookbook. He was born in Bulgaria from Indonesian parents. He moved to the Netherlands in the 1990s, where he graduated from high school and got a MSc in Experimental Physics.

His graduation thesis had a strong emphasis on Applied Computer Science. After graduating he worked for several companies as Java Developer, Datawarehouse Developer and QA Analyst.

His main professional interests are Business Intelligence, Big Data and Cloud Computing. Ivan Idris enjoys writing clean testable code and interesting technical articles.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
4 (23%)
4 stars
9 (52%)
3 stars
2 (11%)
2 stars
0 (0%)
1 star
2 (11%)
Displaying 1 - 4 of 4 reviews
Profile Image for Edward Grefenstette.
2 reviews1 follower
August 7, 2014
The following review was produced after being sent a free copy of the book by Packt Publishing. I have endeavoured to be objective and state my view of the book, unaltered by this.

"Learning NumPy Array" by Ivan Idris is an excellent book which covers a range of use cases for the Python NumPy library across different aspects of scientific computing. It gives a short introduction to NumPy classes and core functions, discusses data analysis with NumPy data structures, and then using the pandas library (built on top of NumPy, amongst other libraries), provides a succinct overview of signal processing techniques with NumPy, followed by a short tutorial of profiling and debugging NumPy code with iPython, UnitTest, and Nose. The book ends with a helpful chapter on other tools scientific computing programmers may wish to consider alongside NumPy, most importantly cython and sklearn.

While the book is entitled "Learning NumPy Array", it is not exactly aimed at a beginner audience. The reader is assumed to have a decent knowledge of linear algebra, statistics, and some cursory experience with similar statistics or matrix libraries/languages such as Matlab or R. While it does introduce NumPy basics, the reader should expect to have access to the NumPy documentation while reading the book to get the most out of it. Chapters 3 through 5 are quite dense, and readers without experience with the relevant areas (statistical analysis for chapters 3-4 and signal processing for chapter 5) will need to spend time and perhaps read third-party sources to get the most out of the material. All this is to say, this is a fairly technical book, but the examples are many, are well spelled-out, and coherently explained. Readers with a bit of experience in the domains it covers, or readers who are willing to put in the extra effort to read around the topics, will get a lot out of this book, and be able to implement solutions to similar problems quickly.

In addition to the core material covered in chapters 3-5, I particularly enjoyed the fairly clear tutorials for profiling, debugging and testing in chapter six. Some of this material could easily have been excluded from the book in favour of expanding the explanations and giving some background in chapters 3-5, but I found the explanations to be well written and helpful, so the inclusion in this book is appreciated.

Furthermore, the final chapter is a nice starting point for newcomers to the python scientific computing world, as it presents some helpful pointers (and use examples) to other resources available. Even as a researcher who has used these tools before once or twice, at least, this chapter was a good read and reminded me of how easily these libraries play with each other.

Overall, this is a good read. It will take some small effort for most readers to get through the more technical sections of this book, but there is a lot to get out of reading it. While the same material can be found in several tutorials scattered around the web, it is good to see that someone took the effort to distil all the material into one volume, provide excellent example code, and enough explanation to feed intuitions as to how to best apply the knowledge presented in it.
Profile Image for Sujit.
4 reviews1 follower
June 26, 2014
Numpy is a fast matrix library that is at the core of scientific computing toolkits in Python - whether you are doing statistics, machine learning or signal processing (to name just a few possibilities), chances are you are using Numpy under the covers. Because Numpy is optimized for speed and because you are often dealing with large datasets, knowing the right function to call can mean the difference between run times of a few seconds or a few hours. This book can help you write cleaner and faster Numpy code.

After a quick introduction to Numpy in Chapter 1, Chapter 2 takes the reader through a quick tour of Numpy functions, describing the major ones, including differently named functions which do the same thing, one updating in place and the other creating a copy. Chapter 3-5 on is all case studies, mostly about Time Series Analysis and Signal Processing, perhaps because they are good vehicles for demonstrating array handling techniques, but a nice side effect is that it gives the reader a quick introduction to these subjects as well. Chapter 6 describes Numpy's unit testing functionality, and also covers Python unit testing frameworks (unittest package as well as nose). It also describes how to profile and debug Python code from the IPython shell. Chapter 7 quickly covers various other players in the scientific Python ecosystem, and describes how to optimize Python code by rewriting them to Cython.

I found the book immensely informative and relatively easy to read. It helps to actually work through the code in a Python shell as you are reading the book, in some cases the author condenses multiple steps into a single one, obviously expecting the reader to follow along, so being able to break the steps into smaller ones can help in understanding. Using the shell also gives you access to Python's help system, so you can read about new functions as you encounter them. One minor nit - it would have been more convenient if the data used for the analysis could have been packaged with the code for the book (for people reading the book offline) - but perhaps there are copyright restrictions on such distribution.

More information about the book can be found on the publisher's website: http://bit.ly/UyKBJ1

DISCLAIMER: I didn't purchase this book, a PackT representative in my social network was offering free copies to review, and I asked for one because (a) I use Numpy and wanted to learn more and (b) as a Numpy user, I felt qualified to review the book objectively.
Profile Image for Tuula.
9 reviews1 follower
August 10, 2017
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.
230 reviews3 followers
December 6, 2015
It is very very short and simple book. It mains to cover NumPy, however there is a lot of mess and chapters include testing, analytics and etc. Very informative with references to Wikipedia.
Displaying 1 - 4 of 4 reviews

Can't find what you're looking for?

Get help and learn more about the design.