Errata

SciPy and NumPy

Errata for SciPy and NumPy

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
PDF
Page 20
second code listing

# Accessing the columns is achieved in the same way,
# which is the bottom row.
should read:
# Accessing the rows is achieved in the same way,
# which is the bottom row.
(page 10 printed page numbers, page 20 in pdf)

Note from the Author or Editor:
On page 10 of the printed text (section 2.1.3) there is a typo.

# Accessing the columns is achieved in the same way,
# which is the bottom row.

Should be changed to

# Accessing the rows is achieved in the same way,
# which is the bottom row.

B.Plank  Mar 09, 2013 
Printed, PDF, ePub, Mobi,
Page 11
The third chunk of code on the top half of the page.

Line in question:
compound_index = (img1 > 3) & (img1 < 7)
should be:
compound_index = (img1 >2) & (img1 < 6)

Note from the Author or Editor:
This is typo present in both the printed and ebook formats. Please do the respective change in the code example.

change

# Let's filter out all values larger than 2 and less than 6
index1 = img1 > 2
index2 = img1 < 6
compound_index = index1 & index2

to

# Let's filter out all values larger than 3 and less than 7
index1 = img1 > 3
index2 = img1 < 7
compound_index = index1 & index2

Anonymous  Dec 16, 2012  Feb 01, 2013
PDF
Page 13
first section of code

The dtype= in loadtxt() needs {} braces

dtype='names': ('ID', 'Result', 'Type'),
'formats': ('S4', 'f4', 'i2'))

should be

dtype={'names': ('ID', 'Result', 'Type'),
'formats': ('S4', 'f4', 'i2')})

Note from the Author or Editor:
This has been fixed in the book update.

Scott  Dec 11, 2012  Feb 01, 2013
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 12
end of 3rd paragraph of text

I think
as easily and quickly as with numpy.readtxt.
should be
as easily and quickly as with numpy.loadtxt.

Note from the Author or Editor:
The errata is correct. Please change the sentence as the reader suggested. The sentence is the last sentence in the 2nd paragraph on page 12 (print version).

Change

"as easily and quickly as with numpy.readtxt."

to

"as easily and quickly as with numpy.loadtxt."

Scott  Dec 11, 2012  May 29, 2013
Printed
Page 7
the bottom most example.

The line in question is:

>>> arr3d = np.reshape(arr1s, (10, 10, 10))

Should read:

>>> arr2d = np.reshape(arr1d, (10, 10, 10))

Note from the Author or Editor:
On page seven of the book, eighth line of the code sample, the following needs to be changed.

arr3d = np.reshape(arr1s, (10, 10, 10))

to

arr3d = np.reshape(arr1d, (10, 10, 10))

Anonymous  Dec 10, 2012  Jan 31, 2013
PDF, ePub
Page 29
Code sample at bottom of the page

Sample code should be "from scipy.stats import norm" instead of "import scipy.stats import norm"

Note from the Author or Editor:
On page 29 the example code, second line, should be "from scipy.stats import norm" instead of "import scipy.stats import norm".

Anonymous  Dec 03, 2012  Jan 31, 2013
PDF
Page 9

Sample code at the top of the page contains error

Should be recarr['Integers'] instead of recarr('Integers') in the book

Note from the Author or Editor:
In section 2.1.2, the second to last line of the code text change recarr('Integers') to recarr['Integers'].

Anonymous  Nov 27, 2012  Jan 31, 2013
Other Digital Version
6

Comments in the example suggest that arange(100) will generate the numbers 0 to 100. In fact, it will generate numbers 0 to 99. The comment for arange(10,100) has the same error.

Note from the Author or Editor:
In section 2.1.1, in the first code example, change

# What if we want to create an array going from 0 to 100?

to

# What if we want to create an array going from 0 to 99?

Do the same for the following commented line in the same code example:

# Or 10 to 100 ?

to

# Or 10 to 99?

Darius Sullivan  Nov 20, 2012  Jan 31, 2013
ePub
Page vi
Chapter headings

In note that an erratum along these lines has already been noted. I haven't found whole sections of the book not in English (but I haven't looked through the whole eBook).

I bought the ebook version and the mobi and epub files seem to have a few bits and pieces in what I think is Polish. The PDF looks fine.

Instead of Chapter 1 I have Rozdzial 1. Introduction.
Also at the end of the conventions section at the start of the book (just before "Using Code Examples" the text for suggestion/general note and for warning or caution are also not in English (looks like its probably polish again).

Comparing the PDF and the mobi format it looks like this is where the PDF has graphical icons.

Simon Ellingsen  Nov 16, 2012  Nov 16, 2012
ePub
Page all
All electronic versions of the book

A customer who bought the book (both print and electronic) is reporting that the epub and mobi formats are have sections in foreign languages and titles look strange. It sounds like some kind of bug in the conversion process? The customer is John Gizis (@johngizis on Twitter). Maybe it would be good to get in contact with him to see what the problem is?

Update: This has just been confirmed by another customer with the ePub format. Hence, this is not an isolated problem.

Eli Bressert
Eli Bressert
 
Nov 15, 2012  Nov 16, 2012
Printed, PDF, ePub
Page 17
Top of section

The section in the Scipy Chapter titled "Optimization and Minimization" should be changed to just "Optimization". The error is minor, but it should be corrected.

Eli Bressert
Eli Bressert
 
Nov 15, 2012  Jan 31, 2013