Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
NumPy Beginner's Guide
NumPy Beginner's Guide

NumPy Beginner's Guide: An action packed guide using real world examples of the easy to use, high performance, free open source NumPy mathematical library. , Second Edition

eBook
€8.99 €28.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

NumPy Beginner's Guide

Chapter 2. Beginning with NumPy Fundamentals

After installing NumPy and getting some code to work, it's time to cover NumPy basics.

The topics we shall cover in this chapter are:

  • Data types

  • Array types

  • Type conversions

  • Array creation

  • Indexing

  • Slicing

  • Shape manipulation

Before we start, let me make a few remarks about the code examples in this chapter. The code snippets in this chapter show input and output from several IPython sessions. Recall that IPython was introduced in Chapter 1, NumPy Quick Start, as the interactive Python shell of choice for scientific computing. The advantages of IPython are the PyLab switch that imports many scientific computing Python packages, including NumPy, and the fact that it is not necessary to explicitly call the print function to display variable values. However, the source code delivered alongside the book is regular Python code that uses imports and print statements.

NumPy array object


NumPy has a multi-dimensional array object called ndarray . It consists of two parts:

  • The actual data

  • Some metadata describing the data

The majority of array operations leave the raw data untouched. The only aspect that changes is the metadata.

We have already learned, in the previous chapter, how to create an array using the arange function. Actually, we created a one-dimensional array that contained a set of numbers. ndarray can have more than one dimension.

The NumPy array is in general homogeneous (there is a special array type that is heterogeneous)—the items in the array have to be of the same type. The advantage is that, if we know that the items in the array are of the same type, it is easy to determine the storage size required for the array.

NumPy arrays are indexed just like in Python, starting from 0. Data types are represented by special objects. These objects will be discussed comprehensively in this chapter.

We will create an array with the arange function again...

Time for action – creating a multidimensional array


Now that we know how to create a vector, we are ready to create a multidimensional NumPy array. After we create the matrix, we would again want to display its shape.

  1. Create a multidimensional array.

  2. Show the array shape:

    In: m = array([arange(2), arange(2)])
    In: m
    Out:
    array([[0, 1],
           [0, 1]])
    In: m.shape
    Out: (2, 2)

What just happened?

We created a two-by-two array with the arange function we have come to trust and love. Without any warning, the array function appeared on the stage.

The array function creates an array from an object that you give to it. The object needs to be array-like, for instance, a Python list. In the preceding example, we passed in a list of arrays. The object is the only required argument of the array function. NumPy functions tend to have a lot of optional arguments with predefined defaults.

Pop quiz – the shape of ndarray

Q1. How is the shape of an ndarray stored?

  1. It is stored in a comma-separated string.

  2. It is...

Time for action – creating a record data type


The record data type is a heterogeneous data type—think of it as representing a row in a spreadsheet or a database. To give an example of a record data type, we will create a record for a shop inventory. The record contains the name of the item, a 40-character string, the number of items in the store represented by a 32-bit integer and, finally, a price represented by a 32-bit float. The following steps show how to create a record data type:

  1. Create the record:

    In: t = dtype([('name', str_, 40), ('numitems', int32), ('price', float32)])
    In: t
    Out: dtype([('name', '|S40'), ('numitems', '<i4'), ('price','<f4')])
  2. View the type (we can view the type of a field as well):

    In: t['name']
    Out: dtype('|S40')

If you don't give the array function a data type, it will assume that it is dealing with floating point numbers. To create the array now, we really have to specify the data type; otherwise, we will get a TypeError:

In: itemz = array([('Meaning of...

One-dimensional slicing and indexing


Slicing of one-dimensional NumPy arrays works just like slicing of Python lists. We can select a piece of an array from index 3 to 7 that extracts the elements 3 through 6:

In: a = arange(9)
In: a[3:7]
Out: array([3, 4, 5, 6])

We can select elements from index 0 to 7 with a step of 2:

In: a[:7:2]
Out: array([0, 2, 4, 6])

Similarly as in Python, we can use negative indices and reverse the array:

In: a[::-1]
Out: array([8, 7, 6, 5, 4, 3, 2, 1, 0])

Time for action – slicing and indexing multidimensional arrays


A ndarray supports slicing over multiple dimensions. For convenience, we refer to many dimensions at once, with an ellipsis.

  1. To illustrate, we will create an array with the arange function and reshape it:

    In: b = arange(24).reshape(2,3,4)
    In: b.shape
    Out: (2, 3, 4)
    In: b
    Out:
    array([[[ 0,  1,  2,  3],
            [ 4,  5,  6,  7],
            [ 8,  9, 10, 11]],
           [[12, 13, 14, 15],
            [16, 17, 18, 19],
            [20, 21, 22, 23]]])

    The array b has 24 elements with values 0 to 23 and we reshaped it to be a two-by-three-by-four, three-dimensional array. We can visualize this as a two-story building with 12 rooms on each floor, three rows and four columns (alternatively, you can think of it as a spreadsheet with sheets, rows, and columns). As you have probably guessed, the reshape function changes the shape of an array. You give it a tuple of integers, corresponding to the new shape. If the dimensions are not compatible with the data...

Time for action – manipulating array shapes


We already learned about the reshape function. Another recurring task is flattening of arrays.

  1. Ravel: We can accomplish this with the ravel function:

    In: b
    Out:
    array([[[ 0,  1,  2,  3],
            [ 4,  5,  6,  7],
            [ 8,  9, 10, 11]],
           [[12, 13, 14, 15],
            [16, 17, 18, 19],
            [20, 21, 22, 23]]])
    In: b.ravel()
    Out:
    array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13,14, 15, 16,
           17, 18, 19, 20, 21, 22, 23])
  2. Flatten: The appropriately-named function, flatten , does the same as ravel, but flatten always allocates new memory whereas ravel might return a view of the array.

    In: b.flatten()
    Out:
    array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13,14, 15, 16,
           17, 18, 19, 20, 21, 22, 23])
  3. Setting the shape with a tuple: Besides the reshape function, we can also set the shape directly with a tuple, which is shown as follows:

    In: b.shape = (6,4)
    In: b
    Out:
    array([[ 0,  1,  2,  3],
           [ 4,  5,  6,  7...

Time for action – stacking arrays


First, let's set up some arrays:

In: a = arange(9).reshape(3,3)
In: a
Out:
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])
In: b = 2 * a
In: b
Out:
array([[ 0,  2,  4],
       [ 6,  8, 10],
       [12, 14, 16]])
  1. Horizontal stacking: Starting with horizontal stacking, we will form a tuple of ndarrays and give it to the hstack function. This is shown as follows:

    In: hstack((a, b))
    Out:
    array([[ 0,  1,  2,  0,  2,  4],
           [ 3,  4,  5,  6,  8, 10],
           [ 6,  7,  8, 12, 14, 16]])

    We can achieve the same with the concatenate function, which is shown as follows:

    In: concatenate((a, b), axis=1)
    Out:
    array([[ 0,  1,  2,  0,  2,  4],
           [ 3,  4,  5,  6,  8, 10],
           [ 6,  7,  8, 12, 14, 16]])
  2. Vertical stacking: With vertical stacking, again, a tuple is formed. This time, it is given to the vstack function. This can be seen as follows:

    In: vstack((a, b))
    Out:
    array([[ 0,  1,  2],
           [ 3,  4,  5],
           [ 6,  7,  8],
           [ 0,  2,  4],
          ...

Time for action – splitting arrays


  1. Horizontal splitting: The ensuing code splits an array along its horizontal axis into three pieces of the same size and shape:

    In: a
    Out:
    array([[0, 1, 2],
           [3, 4, 5],
           [6, 7, 8]])
    In: hsplit(a, 3)
    Out:
    [array([[0],
           [3],
           [6]]),
     array([[1],
           [4],
           [7]]),
     array([[2],
           [5],
           [8]])]

    Compare it with a call of the split function, with extra parameter axis=1:

    In: split(a, 3, axis=1)
    Out:
    [array([[0],
           [3],
           [6]]),
     array([[1],
           [4],
           [7]]),
     array([[2],
           [5],
           [8]])]
  2. Vertical splitting: The vsplit function splits along the vertical axis:

    In: vsplit(a, 3)
    Out: [array([[0, 1, 2]]), array([[3, 4, 5]]), array([[6, 7,8]])]

    The split function, with axis=0, also splits along the vertical axis:

    In: split(a, 3, axis=0)
    Out: [array([[0, 1, 2]]), array([[3, 4, 5]]), array([[6, 7,8]])]
  3. Depth-wise splitting: The dsplit function, unsurprisingly, splits depth-wise. We will need an array of rank...

Time for action – converting arrays


We can convert a NumPy array to a Python list with the tolist function:

  1. Convert to a list:

    In: b
    Out: array([ 1.+1.j,  3.+2.j])
    In: b.tolist()
    Out: [(1+1j), (3+2j)]
  2. The astype function converts the array to an array of the specified type:

    In: b
    Out: array([ 1.+1.j,  3.+2.j])
    In: b.astype(int)
    /usr/local/bin/ipython:1: ComplexWarning: Casting complex values to real discards the imaginary part
      #!/usr/bin/python
    Out: array([1, 3])

    Note

    We are losing the imaginary part when casting from complex type to int. The astype function also accepts the name of a type as a string.

    In: b.astype('complex')

    Out: array([ 1.+1.j, 3.+2.j])

    It won't show any warning this time, because we used the proper data type.

What just happened?

We converted NumPy arrays to a list and to arrays of different data types.

Summary


We learned a lot in this chapter about the NumPy fundamentals: data types and arrays. Arrays have several attributes describing them. We learned that one of these attributes is the data type, which in NumPy, is represented by a full-fledged object.

NumPy arrays can be sliced and indexed in an efficient manner, just like Python lists. NumPy arrays have the added ability of working with multiple dimensions.

The shape of an array can be manipulated in many ways—stacking, resizing, reshaping, and splitting. A great number of convenience functions for shape manipulation were demonstrated in this chapter.

Having learned about the basics, it's time to move on to the study of commonly-used functions in Chapter 3, Get to Terms with Commonly Used Functions. This includes basic statistical and mathematical functions.

Left arrow icon Right arrow icon

Key benefits

  • Perform high performance calculations with clean and efficient NumPy code.
  • Analyze large data sets with statistical functions
  • Execute complex linear algebra and mathematical computations

Description

NumPy is an extension to, and the fundamental package for scientific computing with Python. In today's world of science and technology, it is all about speed and flexibility. When it comes to scientific computing, NumPy is on the top of the list. NumPy Beginner's Guide will teach you about NumPy, a leading scientific computing library. NumPy replaces a lot of the functionality of Matlab and Mathematica, but in contrast to those products, is free and open source. Write readable, efficient, and fast code, which is as close to the language of mathematics as is currently possible with the cutting edge open source NumPy software library. Learn all the ins and outs of NumPy that requires you to know basic Python only. Save thousands of dollars on expensive software, while keeping all the flexibility and power of your favourite programming language.You will learn about installing and using NumPy and related concepts. At the end of the book we will explore some related scientific computing projects. This book will give you a solid foundation in NumPy arrays and universal functions. Through examples, you will also learn about plotting with Matplotlib and the related SciPy project. NumPy Beginner's Guide will help you be productive with NumPy and have you writing clean and fast code in no time at all.

Who is this book for?

If you are a programmer, scientist, or engineer who has basic Python knowledge and would like to be able to do numerical computations with Python, this book is for you. No prior knowledge of NumPy is required.

What you will learn

  • Install NumPy
  • NumPy arrays
  • Universal functions
  • NumPy matrices
  • NumPy modules
  • Plot with Matplotlib
  • Test NumPy code
  • Relation to SciPy

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 25, 2013
Length: 310 pages
Edition : 2nd
Language : English
ISBN-13 : 9781782166092
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 25, 2013
Length: 310 pages
Edition : 2nd
Language : English
ISBN-13 : 9781782166092
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 117.97
NumPy Cookbook
€37.99
Building Machine Learning Systems with Python
€41.99
NumPy Beginner's Guide
€37.99
Total 117.97 Stars icon
Banner background image

Table of Contents

11 Chapters
NumPy Quick Start Chevron down icon Chevron up icon
Beginning with NumPy Fundamentals Chevron down icon Chevron up icon
Get in Terms with Commonly Used Functions Chevron down icon Chevron up icon
Convenience Functions for Your Convenience Chevron down icon Chevron up icon
Working with Matrices and ufuncs Chevron down icon Chevron up icon
Move Further with NumPy Modules Chevron down icon Chevron up icon
Peeking into Special Routines Chevron down icon Chevron up icon
Assure Quality with Testing Chevron down icon Chevron up icon
Plotting with Matplotlib Chevron down icon Chevron up icon
When NumPy is Not Enough – SciPy and Beyond Chevron down icon Chevron up icon
Playing with Pygame Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(14 Ratings)
5 star 35.7%
4 star 50%
3 star 14.3%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




nipun Jun 13, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I had written a review for this book on my blog here: http://nipunbatra.wordpress.com/2013/06/11/book-review-numpy-beginners-guide-second-edition/ I would recommend this book highly. It is very good for newcomers. For Python oldies it might be a little slow. NumPy Beginner's Guide - Second Edition
Amazon Verified review Amazon
Tamir Lousky Jun 15, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book is very well written, and tries (quite successfully) to address this specialized, complicated subject in a light, simplified manner without losing depth and oversimplifying. The book includes many down to earth examples and sample code, and many interesting exercises that help implement the material.It starts with a nice, gradual introduction to NumPy, its functions, data structures and uses (and of course, how to install it). Then, the book addresses how to handle, analyze and manipulate larger datasets with examples from stock market data. Around half way, the book focuses on matrices and linear systems. The last few subjects cover advanced topics which I didn't delve into yet.All in all, a very good book, fun to read and useful. Recommended to anyone interested in manipulating arrays, matrices and large datasets in python efficiently.For further information, please see the mini-review on my blog:http://bioblog3d.wordpress.com/2013/06/15/numpy-beginners-guide-review/
Amazon Verified review Amazon
ReaddyEddy Jul 03, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Who is it for:This is an excellent book for the Python programmer who wants to extend their knowledge into mathematical programming and those with a mathematical or engineering background who want to leverage open source alternatives to commercial tools by using the NumPy with Python.Installation and other packages:Installation on the main platforms and the relationship between NumPy and SciPy, and using the library with Matplotlib and other Python modules is well covered.What's covered:The coverage is goes from creating vectors and multi-dimensional matrices through calculating Eigenvectors, the FFT, complex numbers, polynomial fitting and many others.Example Code:The examples I've followed are well thought through and illustrate the use the relevant parts of the NumPy API required in a clear and concise manner. An increasing amount of mathematical background is needed and for a beginner the book should be read in conjunction with a text book covering the relevant material.Recommendation:I would heartily recommend the book both as tool for learning and as a working reference for the NumPy library and wish it had been available when I was going up the learning curve.
Amazon Verified review Amazon
Paul A. Courchene Jul 02, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I wish to comment on the excellent book by Ivan Idris. The text entitled NumPy Beginner's Guide, Second Edition is an outstanding book for a broad range of computer enthusiasts. While not all computer nerds are necessarily interested in Programming per se', in light of the growth and momentum of digital media, it is now a fact of life that many fields of employment require some basic introduction to computer programming. Whether you are a business or financial analyst, or perhaps a serious computer wanabee, or even a College student, it is now time to take the first step. With the momentum seen in the computer language of Python, many people who would otherwise not be inclined to learn this skill, never the less are posing some interest and saying "I wonder if I could do that?" This book will show you how. Since this book covers programming with Python from A to Z, and provides an easy path of self-learning, a number of people with a broad range of computer and math skills can accomplish these tasks.Yes, sitting in the classroom somewhere and listening to someone lecture on the fine points of computer programming may be the road to success for lots of people, but it is not beyond achieving this same goal of learning new skills by self-study ... In the first few pages of this book, the notion of interactive python is introduced (called IPython). That is, one would take a canned script or snippet of sample code and run it in a command line interpreter or interactive shell. That is a fancy name for entering code at a prompt, essentially using a cut and paste routine. How simple can it be ... Since the subject text has a bazillion examples or python routines and coding structure, one can view a broad range of examples from the simplistic to the quite advanced level. With this book, following along step by step or page by page, you can almost become a computer (read python) programmer, overnight. I. E., one enters the example code, then follows the book and reviews the resulting output, along with subtle hints about the interpreter operation. The shell (or debugger) will allow you to step into the code line by line and view the resultant computer operations. Thus, not only do you have visual feedback (to check your work) but one of the books highlights are the numerous "On-line resources and help" that will provide you with support material at a click of a mouse. As an aside, I regularly read the Yahoo email Group entitled "the Python Community"([...] each day where someone asks the basic question about "Where can I learn Python by way of self-study?" This book provides that answer and opportunity. So Chapter 1 of this book is appropriately entitled"NumPy Quick Start". As you begin Chapter 2, you will soon recognize the format that follows, and gives the reader (or student) an introduction to key Python topics. For example, to program a machine to organize and otherwise manipulate data, be it text or a set of integers, we need to know some basic objects such as data structures. So after a few words about a data structure like an "array", one needs to create an array using examples (code) from the book. With further comments about "What happened?", while creating an array, you will be provided a mini quiz or "Pop quiz" that will test your comprehension and understanding of the concept at hand. Obviously, the quiz is a good reinforcement tool to aid learning. Next, the author uses additional examples to lead you through some more variations of the objects that you are studying. That is: the "Time for Action" is now an opportunity to alter or create alternate arrays by manipulating their dimensions etc. This Time for Action is actually a number of requests (or examples) for "you to try it". Now, not only are you learning new skills and techniques but in fact are "gaining experience" with Python. As a computer wanabee, I now recommend that you take a pencil in hand and copy some of the examples on paper (that you may be interested in). This may be seen as a proactive learning experience and will help you understand some rudimentary things like the syntax (the ways words combine to form phrases or code) of the Python language.Let me clarify a point here, about this text. It is true that this text is focused on mathematical techniques that the average beginner may not be quite ready for, I. E. basic Statistics and Linear Models as seen in Chapter 3, but I would argue that as we discussed above, the layout of the book and its associated (read: excellent) format allows one to learn and gain experience, one step at a time. Chapter 4 of the book lays out additional functions that start to exhibit the power of NumPy. For example (page 95) starts a discussion of Polynomials, in layman's terms, that of finding a function the fits a set of data. I am of course assuming that you have some interest in math and "numbers" per se', if in fact you have searched for this book at Amazon.com Other Chapters go on to highlight such programming techniques as related to:(3). CSV files, Simple Statistics, Linear Models and Trend Lines, (4). Convenient Functions,(5). Matrices and Universal Functions, (6) Linear Algebra, Random Numbers, Distributions,(7). Special Routines for Sorting, Searching, Financial Functions. (8) Quality and Testing [of software],(9). Plotting (results such as Graphs, Histograms, Scatter Plots etc.),(10.) SciPy., a Python based system for Scientists, Engineering and Mathematics. and(11). PyGames. What could be more fun than learning to program games in Python. As you inspect this book, you will find something of interest to everyone who is acquainted with the word Python.It is an excellent book in a format that is easy to find a keyword or idea and will remain a valuable resource to you, for a long time.
Amazon Verified review Amazon
Roberto Avilés Jun 09, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been reviewing Ivan Idris Numpy `beginner's guide', second edition of a great book. While in the first edition he started explaining iPython and Matplotlib, this second is an even more practical guide: "less theory, more results". The first chapter deals with essentials as Python, iPython and libraries as NumPy, Matplotlib and Scipy and ends with applications to vectors and arrays using those tools. Just then in second chapter he goes deep into NumPy fundamentals with many exercises using arrays, including passing from an array to a list (exercise that helps to understand what are the differences and advantages of each data type.)Chapter 3 relates to common functions and applications to, example, finances and times. Chapter 4 deals with how to fit polynomials and also Smoothing and as an example, the Hanning function. Chapter 5 is related to matrices and "ufuncs" (short by universal functions) including how to create it and use with a code. These ideas are applied to a classic, Fibonacci numbers but also to Lissajous curves and the drawing of sawtooth and triangle waves, and also how to work with bitwise comparison operations. Up to this point this is the perfect companion for a crash course on the uses of Python and libraries like NumPy; however is also strong enough to be used as part of a college lecture or as the tool that should not be absent in your tool box and desk. Is hard to summarize further chapters; is a very good book because Idris shows his ability to explain in clear and concise sentences and then he applies immediately to exercises in a variety of areas. If you can't find what you need in this book, the only solution might be a do it yourself solution, based in the' big book', the web! In chapter 6 he explains applications to Linear Algebra including eigenvalues and eigenvectors, Fourier Transform, random numbers and applications to a gambling show. In chapter 7 he works with complex numbers, including sorting and searching, and even plays with Bessel functions. Chapter 8 deals on Assuring Quality with Testing and how to assert and compare arrays. Chapter 9 is one of my favorites, because Idris shows excellent examples on how to plot using Matplotlib, including animations! If you cannot impress your audience with these tools, likely they are dead. In Chapter 10 he goes deeper on libraries like Scipy (NumPy + SciPy are essentials on dealing with big arrays of data, like images) but this time Idris also give us hints in how to deal with audio processing. Finally in Chapter 11, he talks about PyGame along with Matplotlib, Numpy and applications to ... Artificial Intelligence, and simulations of life.Certainly one book can hardly cover ALL `what we need'. However, is up to us to get the most of a tool. If you work on Engineering or Science and are in need to deal with data, vectors, matrices, arrays, sounds or images, if you need to plot and to make things evident to others, if you need a data handling Swiss tool in your toolkit, this is it, clear, concise, full of many examples in so many areas that you will always have something to talk with others even from areas different to yours. Read it, use it, enjoy it.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.