In weniger als einer Minute können Sie mit dem Lesen von NumPy Cookbook auf Ihrem Kindle beginnen. Sie haben noch keinen Kindle? Hier kaufen Oder fangen Sie mit einer unserer gratis Kindle Lese-Apps sofort an zu lesen.

An Ihren Kindle oder ein anderes Gerät senden


Kostenlos testen

Jetzt kostenlos reinlesen

An Ihren Kindle oder ein anderes Gerät senden

Jeder kann Kindle Bücher lesen  selbst ohne ein Kindle-Gerät  mit der KOSTENFREIEN Kindle App für Smartphones, Tablets und Computer.
NumPy Cookbook

NumPy Cookbook [Kindle Edition]

Ivan Idris

Kindle-Preis: EUR 15,13 Inkl. MwSt. und kostenloser drahtloser Lieferung über Amazon Whispernet

Weitere Ausgaben

Amazon-Preis Neu ab Gebraucht ab
Kindle Edition EUR 15,13  
Taschenbuch EUR 33,50  

Kunden, die diesen Artikel gekauft haben, kauften auch



In Detail

Today's world of science and technology is all about speed and flexibility. When it comes to scientific computing, NumPy is on the top of the list. NumPy will give you both speed and high productivity.

"NumPy Cookbook" will teach you all about NumPy, a leading scientific computing library. NumPy replaces a lot of the functionality of Matlab and Mathematica, but in contrast to those products, it is free and open source.

"Numpy Cookbook" will teach you to write readable, efficient, and fast code that is as close to the language of Mathematics as much as possible with the cutting edge open source NumPy software library.

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. You will also learn about plotting with Matplotlib and the related SciPy project through examples.

"NumPy Cookbook" will help you to be productive with NumPy and write clean and fast code.


Written in Cookbook style, the code examples will take your Numpy skills to the next level.

Who this book is for

This book will take Python developers with basic Numpy skills to the next level through some practical recipes.

Über den Autor und weitere Mitwirkende

Ivan Idris

Ivan Idris has an MSc in Experimental Physics. His graduation thesis had a strong emphasis on Applied Computer Science. After graduating, he worked for several companies as a Java Developer, Data Warehouse Developer, and QA Analyst. His main professional interests are business intelligence, big data, and cloud computing. He enjoys writing clean, testable code, and interesting technical articles. He is the author of NumPy 1.5 Beginner's Guide. You can find more information and a blog with a few NumPy examples at


  • Format: Kindle Edition
  • Dateigröße: 1651 KB
  • Seitenzahl der Print-Ausgabe: 226 Seiten
  • Verlag: Packt Publishing (25. Oktober 2012)
  • Verkauf durch: Amazon Media EU S.à r.l.
  • Sprache: Englisch
  • ASIN: B009X5KIH8
  • Text-to-Speech (Vorlesemodus): Aktiviert
  • X-Ray:
  • Amazon Bestseller-Rang: #135.546 Bezahlt in Kindle-Shop (Siehe Top 100 Bezahlt in Kindle-Shop)

  •  Ist der Verkauf dieses Produkts für Sie nicht akzeptabel?

Mehr über den Autor

Ivan Idris 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.

Welche anderen Artikel kaufen Kunden, nachdem sie diesen Artikel angesehen haben?


Es gibt noch keine Kundenrezensionen auf
5 Sterne
4 Sterne
3 Sterne
2 Sterne
1 Sterne
Die hilfreichsten Kundenrezensionen auf (beta) 4.0 von 5 Sternen  16 Rezensionen
9 von 10 Kunden fanden die folgende Rezension hilfreich
4.0 von 5 Sternen Recipies for scientifics 18. Dezember 2012
Von cbrunet - Veröffentlicht auf
I'm a PhD student whose has been using Python, NumPy, and related software for two years. This is why I was excited reading a book about NumPy, wondering what I could learn from it. When I opened the book and read the Table of Contents, I realized that the book was covering far mush than only NumPy library. As a matter of fact, it talks about many other pieces of software gravitating around it. Another thing I realized is that, as the title states, it's a Cookbook. This book teaches NumPy by examples. Those examples, like recipes in a cookbook, are there to teach you different aspects of NumPy. They are short, but not necessarily simple, meaning you have to think about them to well understand how they work. It assumes you already know Python, and have some basis on scientific computing.

Chapter 1 is about IPython, an alternative Python shell, well suited for scientific use. I think they begin talking about this to give you a tool you can use to experiment with NumPy et al. It doens't give mush about it, but just enough to give an insight of how powerful it is. This chapter also talk about installation of not only IPython, but also other libraries like Matplotlib and Sympy. However, I think it is a bad idea talking about software installation in a book, since it is version and platform dependant. The strangest thing is that nowhere in the book it talks about installing NumPy itself!

Chapter 2 is about array indexing, which is the core of NumPy functionality. But again, it begins by explaining how to install other related software like SciPy and PIL. After that, a serie of examples are given, to illustrate different aspects of array indexing with NumPy. What is interesting is the variety of the examples: image manipulation, Sudoku puzzle, sound manipulation... There are recipes for every tastes! However, I think a little general introduction about how array indexing works in NumPy is missing there. Without my knowledge of NumPy, I think it would be difficult for me to well understand the examples.

Chapter 3 gives recipes using commonly used NumPy functions. To do it, a variety of mathematical problems are exposed and solved. For each problem, a Wikipedia link is given to allow the reader to familiarize itself with the problem and the algorithm used to solve it. I found this chapter very interesting. I even learned about an obscure undocumented Matplotlib module used to query an plot financial data on Yahoo finance.

Chapter 4 talks about how to interconnect NumPy with other pieces of software. It first talks about buffer and array interfaces that allow to exchange NumPy arrays with other Python libraries without needing to copy the data. Then it shows how to exchange data with other software like Matlab and Octave, R, and Java. Finally, it gives an insight of how to use NumPy in the cloud, using either Google App Engine, Python Anywhere, or PiCloud.

Chapter 5 is dedicated to audio and image processing. The use of images and sounds is interesting because we can see (or hear) the result of our manipulations. The recipes also are closer to real world problems. Here, we combine images, we repeat sounds, and we apply different kinds of filters. As a bonus, we generate the Mandelbrot set!

Chapter 6 is about special arrays and universal functions. I must admit I learned a lot of new things on NumPy reading this chapter. As always, it doesn't study all the possibilities in depth, but gives a good introduction to understand how it works.

Chapter 7 is about profiling and debugging. Those are two very important tasks when developing scientific software. I like the fact it covers many tools used to profile and debug NumPy code. I wasn't aware of some of those tools.

Chapter 8 is about quality assurance (QA). It talks about software and libraries to perform code coverage, unit tests, mocking, etc. Chapter 7 and 8 (and chapter 1) are different from the rest of the book, in the sense they talk about tools instead of giving coding recipes. However, I think this is a good thing, as those are important concepts to master while developing scientific applications.

Chapter 9 is about Cython, a tool allowing to speed up Python by converting it to C code and compiling it. Personally, I use it a lot, because it allows me to optimize critical parts of my code using C language, while performing the rest of the tasks using Python. I must admin I was a little disappointed by the given recipes. It begins with a hello world program, which in in my sense very common an unnecessary. Afterwhat it briefly presents how to optimize Python code and how to call C code using Cython. However, it doesn't mention how to use the buffer interface (which we already saw in chapter 4) to exchange NumPy arrays between C programs and Python without copying data, which is critical to get performance.

Finally, chapter 10 is about Scikits, which are independent projects somehow related to NumPy. Functions presented there covers machine learning, statistical modelling, image processing, and data analysis.

Overall, I liked this book. I think it is well organized and well presented. I appreciated the fact it gives examples taken from a lot of different fields of interest: images, sounds, math, finance... Many recipes are good starting points for solving projecteuler problems. On the other side, I think too mush focus is given to software installation. Some recipes could be simplified to use less dependencies while remaining instructive. There are also some recipes that could gain from having more explanations. Finally, I was surprised not to see any references to Python(x,y) project, which is a good alternative to EDP on Windows.

I would recommend this book to a programmer who knows Python and want to learn about possibilities it offers for scientific programming, or to a programmer already knowing NumPy a little bit, but wanting to get a deeper knowledge of it.

4 von 5 Kunden fanden die folgende Rezension hilfreich
2.0 von 5 Sternen Random examples, repetitive, little value 22. April 2013
Von Davide Roverso - Veröffentlicht auf
Quite poor in my opinion. The whole book is based on a seemingly hodge-podge collection of examples presented in a quite superficial way. For every example or "recipe" the author presents a quick description with code snippets, followed by the complete code, which oftentimes greatly overlap in "information content". When new concept/functions are introduced there is very little explanation or guidance on how to use them. The reader is referred to most of the times to wikipedia or other external sources.
I have problems identifying what is the value of this book. All I got out of the book could have been written in a short blog post with pointers to more in depth descriptions.
4 von 5 Kunden fanden die folgende Rezension hilfreich
2.0 von 5 Sternen A cookbook needs more explanations 22. April 2013
Von R. Campbell - Veröffentlicht auf
There aren't currently a lot of Numpy cookbook-style books, so this book is valuable. However, there's enough wrong with it that you might want to consider the alternatives or simply reading the on-line docs.

There is very little introduction in to what Numpy and Scipy actually are. No introductory talk as to the new objects these packages introduce. e.g. It doesn't explain what the ndarray object gives you over a traditional list object. Instead, there's the obligatory chapter showing you how to install stuff then, *still in the first chapter*, you are thrown in to the web notebook functionality. You haven't even covered array indexing at this point (that's in Chapter 2).

The recipes in this book have a somewhat unusual style:
1. State what is to be achieved in the recipe
2. List a few of the key lines of code with minimal explanation
3. Show the results or outcome
4. Show the full code sample for the recipe

The problem with this approach is that the key lines of code shown in 2 aren't always comprehensible without seeing them in context. For example, they may contain variables that aren't defined until several pages *later*. So you don't get to see the context until right at the end of the recipe. This means that you need to flip back and forth between the explanations in 2 and the full code sample in 4 in order to figure out what's going on.

Another issue with the book is that it doesn't explain a lot of what it shows. Take page 32, where it's showing you how to make copies of an array. We have a 2-D matrix that represents the Lena test image:
- First we are told to make a copy of it with "acopy = lena.copy()" so far so good.
- Then we are told to create a view of the array: "aview = lena.view()" Well, that's fine but the book doesn't tell me at a "view" is. I have to Google it. The numpy manual is a little more enlightening, but I still have questions.
- Then set all the values of the view to 0 with a flat iterator: "aview.flat = 0" What's a flat iterator? I don't know. Googling, I discover lots of links to Numpy pages. So I guess it's not a general term, but something quite Python/Numpy specific. If it's not a term in common usage then an explanation would helpful.

This is all right at the start of the book. Disappointing. I guess it's useful to have all these code snippets here to learn from, but code snippets are cheap and the book doesn't go out of its way to teach you everything that's going on in them. That's why one buys a cookbook: to get the snippets and have an explanation of how they work. I know you can't explain it all in a book, but I'm finding myself turning to Google way too often. So this cookbook has its uses but it feels rather a lot like a bunch of webpages that have been printed out and glued together without too much thought.

Some recipes aren't thorough enough to be useful. For example, the RPy2 interface which allows Python to talk to R is described so briefly that the author may as well not have bothered. There's one "recipe" on how to install RPy2, which is empty filler material. It takes up almost a whole page and the installation instructions are the same as those for any other package. The next recipe is called "Interfacing with R." All that this recipe adds is how to use the importr command to get data from R. That's it. Basically that recipe is one line of code. No interesting usage cases of R and Python. No information on how to call R's stats functions (which is the whole point of this cool interface). Wasted opportunity.

So what alternatives are there? O'Reilly's "SciPy and Numpy" is nice because it explains the background rather well. It covers the distinctions between Numpy and Scipy, and what they add to the core Python commands. There is plenty of well annotated example code. Python For Data Analysis is similar, but emphasises the pandas library more.
4 von 5 Kunden fanden die folgende Rezension hilfreich
5.0 von 5 Sternen Recipes that just make you more hungry... 28. Dezember 2012
Von Amazon Customer - Veröffentlicht auf
When I first mentioned that I was getting this book, a colleague of mine wanted to know why I was even bothering - 'just go straight for Pandas' he said. Actually, I think he is missing the point of both this book and NumPy in general.

Not only is this one of those well written cookbooks that sets out the problems and solutions neatly and succinctly, but it is one of those cookbooks that you turn to, not really expecting to find the answer to a problem you are having right now, but rather solutions to problems that give you insight into just how broad and wide the solutions that NumPy can be applied to.

The NumPy Cookbook covers everything from getting started with IPython (worth the price of admission alone, trust me) - to re-sizing images, processing audio, performing statistical analysis (obviously), estimating stock returns and, well, err, installing Pandas.

The very best cookbooks answer the questions you did not know you had, and show you to do things that you did not know were possible. That is what the 'NumPy Cookbook' does - and it does it exceptionally well.

I spend my time working with Python, examining numbers from our data warehouse, and I have been using NumPy for a long while to manipulate the data, to slice, dice and fill in the blanks. But this book showed me some new tricks, some tricks that I will be able to apply directly to my work, and for that I am grateful.

So, install Pandas and forget all about NumPy? No. NumPy is a pre-requisite for Pandas, and you really should know all about it, because the two are not mutually exclusive. Read this book - and learn about some of the really cool stuff that you can do with NumPy.
2 von 3 Kunden fanden die folgende Rezension hilfreich
4.0 von 5 Sternen Power to the people, made easy 25. Dezember 2012
Von Roberto Avilés - Veröffentlicht auf
This book is great. I have been using the Numpy python library for some time, both for fun as well as for the treatment (processing and data extraction) of image files.
Ivan Idris takes the time to introduces us in Chapter One (hereafter Ch) to the iPython shell (and pylab!). iPython is GREAT and Ivan make it reasonable easy for all of us to use it. Also, it takes time to explain how to deal with other libraries as, e.g., matplotlib.
Ch 2 teaches us how to deal with array indexes and I must say I loved the sudoku example. Ch 3 deals with 'common' functions and once again, I found very nice the example of the palindromic numbers. Well, in fact, what makes this book this good is the amount of exercises, the time Ivan takes to explain and to develop them, easing your own way into Numpy.
Ch 4 is a little jewel because it synthesizes how to fiddle with Numpy and other 3 important tools as MatLab, Octave and R.

However, being a mean small person, I did not like Ch 5, because of the short time Ivan devotes to images and not in the way I would like it. However, dealing with images is sort of too specific. And from that point of view, Ivan gives you tools you can combine and use the way you need, for example, with images.

Ch 6 and the use/treatment of Pithagorean triples, is related to a 'common' computing test, once again Ivan is clever in the use of that example (and many others) with look simple to understand but hide subtleties you will love after a while. And then he goes into dealing with arrays and string operations and the use of masked arrays, revisiting cute Lena. If by now you are not in love with Numpy, damn, you need a check!
Ch 7 deals again with something on which I am not an expert, profiling. As in other chapters, Ivan first explains, gives short definitions and references and then goes into a clear and concise example. He is such a good teacher, he says is an experimental physicist and I guess that explains how he is so good in keeping the order of the full book and their specific sections. The fact that he gives a starting double point of view, allows you to compare and get your own conclusions, and eases the learning!
Ch 8 and 9 introduced me with other 2 important tools I need to know better, QA and code performance improvements using Cython. It helps if you have a good previous knowledge of C, however, it also motivates you to revisit or learn or go deeper into C, a clear extra gain. Up to this point, the book is not a promise, is a real thing, it works, it gives you results. But the best, is just to come.

In my opinion Ivan lefts the best for the end because I am new to computing applications such as machine learning and their use on economy issues. The idea that stocks are data you can deal with same as other 'images' or data, is clearly explained, once again due to the abundance of well explained and step-by-step developed exercises. I believe Ch 10 greatly compensates the lack of a deeper treatment or development on the use of Numpy on images, like in astronomy or medicine, that is my opinion.

If you are a neophyte to Numpy (even more, to Python), and need to learn and to become proficient on the use of Python and a powerful library as Numpy, this books IS for you. If you are a professional, this books summarizes and extends on handy knowledge and provides deep insights and excelent references. It might be obvious to many people but it is also important to have in mind that Python, Numpy, Octave and R (between other tools mentioned in the book) are FREE, with also contributes to make of this a valuable and sure return of your investment.
Waren diese Rezensionen hilfreich?   Wir wollen von Ihnen hören.

Kunden diskutieren

Das Forum zu diesem Produkt
Diskussion Antworten Jüngster Beitrag
Noch keine Diskussionen

Fragen stellen, Meinungen austauschen, Einblicke gewinnen
Neue Diskussion starten
Erster Beitrag:
Eingabe des Log-ins

Kundendiskussionen durchsuchen
Alle Amazon-Diskussionen durchsuchen

Ähnliche Artikel finden