-
Notifications
You must be signed in to change notification settings - Fork 196
/
Copy pathindex.do.txt
286 lines (215 loc) · 10.5 KB
/
index.do.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
TITLE: Resources for A Primer on Scientific Programming with Python
AUTHOR: Hans Petter Langtangen Email:[email protected]
======= The 5th edition =======
<a href="http://www.springer.com/gp/book/9783662498866"><img border="0" width="130" src="figs/Primer5th_pic.jpg"></a>
__Changes from the fourth to the fifth edition.__
Substantial changes were introduced in the fourth edition, and the
fifth edition is primarily a consolidation of those changes. Many
typos have been corrected and many explanations and exercises have
been improved. The emphasis on unit tests and test functions,
especially in exercises, is stronger than in the previous edition.
Symbolic computation with the aid of SymPy is used to a larger extent
and integrated with numerical computing throughout the book. All
classes are now new-style (instead of old-style/classic as in previous
editions). Examples on Matplotlib do not use the `pylab` module
anymore, but `pyplot` and MATLAB-like syntax is still favored to ease
the transition between Python and MATLAB. The concept of closures is
more explicit than in earlier editions (see the new Section 7.1.7)
since this is a handy and popular construction much used in the
scientific Python community. We also discuss the difference between
Python 2 and 3 and demonstrate how to use the `future` module to write
code that runs under both versions.
The most substantial new material in the fifth edition appears toward
the end of Chapter 5 and regards high-performance computing, linear
algebra, and visualization of scalar and vector fields.
The numbering of sections and in particular exercises differs from
previous editions.
===== All programs from the book =====
On Unix/Linux or Mac, download
the tarfile "`book-examples-5th.tar.gz`": "book-examples-5th.tar.gz"
for the 5th edition and pack it out by
!bc sys
tar xvzf book-examples-5th.tar.gz
!ec
On Windows, download "`book-examples-5th.zip`": "book-examples-5th.zip"
for the 4th edition and pack it out by
!bc sys
unzip book-examples-5th.zip
!ec
or double click on the file icon.
The result is a folder (directory)
tree `src` with subfolders containing
the program examples for different chapters in the book
(`formulas`, `looplist`, etc., as explained in the introduction to
each chapter).
An important change from the 4th edition is that the directory `files`
in the 4th edition is named `dictstring` in the 5th edition.
You can also directly access the latest version of the example
files at "GitHub": "https://github.com/hplgit/scipro-primer", see
the "src": "https://github.com/hplgit/scipro-primer/tree/master/src"
directory (to download a file, click the *Raw* button on the right first
to get the pure text file in the browser and then right-click to download).
To copy the whole repository to your computer, run
!bc sys
git clone https://github.com/hplgit/scipro-primer.git
!ec
===== Erratalist =====
Here is a "PDF file": "erratalist5th.pdf" or an "HTML file":
"erratalist4th.html" with an errata list for the
5th edition of the book. If you find any typo or error, please
report it to "the author": "mailto:[email protected]".
======= More resources and information for the latest edition =======
===== Software installation =====
There are several ways to access Python, either on your computer or
in the cloud. "Appendix H.1": "http://hplgit.github.io/edu/accesspy/accesspy_primer4.html" in the book gives an overview of
recommended technologies and how to use them to get the software you need
for working with the book. Our primary recommendation is to install Anaconda - it suffices for the book. However, if you intend to do more advanced
scientific computing in the future, we strongly recommend to use a virtual
Ubuntu machine for all that work.
__SciTools.__
The package SciTools is freqently referred to and used in the book.
You may want to install SciTools directly from its Git version control
repository. This makes it easy to upgrade the package at any time.
SciTools is hosted at "GitHub": "https://github.com/hplgit/scitools/"
(note that the old repository at Googlecode only contains old versions - stay
away from those!).
Make sure you have the Git version control system
on your computer (if not, googling for installation of Git brings you
to simple procedures, depending on the platform you are on).
Get the SciTools source code and install it by
!bc sys
git clone https://github.com/hplgit/scitools.git
cd scitools
sudo python setup.py install
!ec
Whenever you want to upgrade the package, just go to the `scitools`
folder and run the commands
!bc sys
git pull origin master
sudo python setup.py install
!ec
A simpler installation procedure applies `pip`:
!bc sys
pip install -e git+https://github.com/hplgit/scitools.git#egg=scitools --upgrade
!ec
Note that you have to rerun this command to install new versions of SciTools
in the future.
===== Software installation on Ubuntu =====
If you have an Ubuntu installation, Python is already there. The minimum
extra packages are installed by this command:
!bc sys
sudo apt-get install python-matplotlib python-scipy python-gnuplot gnuplot gnuplot-x11 python-scitools
!ec
The Gnuplot packages are optional (you can exclusively used Matplotlib instead).
A comprehensive installation with lots of useful packages can be
performed by a "Bash script": "https://raw.github.com/hplgit/vagrantbox/master/doc/src/vagrant/src-vagrant/install_rich.sh". Download this file (`install_rich.sh`) and run it by `bash install_rich.sh`.
===== Slides =====
There is a "slide collection": "slides/index.html"
from lectures based on the latest edition of the book.
------------
======= The 4th edition =======
<a href="http://www.amazon.com/Scientific-Programming-Computational-Science-Engineering/dp/3642549586/ref=sr_1_2?s=books&ie=UTF8&qid=1407225588&sr=1-2&keywords=langtangen"><img border="0" width="130" src="figs/Primer4th_pic.jpg"></a>
===== All programs from the book =====
On Unix/Linux or Mac, download
the tarfile "`book-examples-4th.tar.gz`": "book-examples-4th.tar.gz"
for the 4th edition and pack it out by
!bc sys
tar xvzf book-examples-4th.tar.gz
!ec
On Windows, download "`book-examples-4th.zip`": "book-examples-4th.zip"
for the 4th edition and pack it out by
!bc sys
unzip book-examples-4th.zip
!ec
or double click on the file icon.
The result is a folder (directory)
tree `src` with subfolders containing
the program examples for different chapters in the book
(`formulas`, `looplist`, etc., as explained in the introduction to
each chapter).
You can also directly access the latest version of the example
files at "GitHub": "https://github.com/hplgit/scipro-primer", see
the "src-4th": "https://github.com/hplgit/scipro-primer/tree/master/src-4th"
directory (to download a file, click the *Raw* button on the right first
to get the pure text file in the browser and then right-click to download).
To copy the whole repository to your computer, run
!bc sys
git clone https://github.com/hplgit/scipro-primer.git
!ec
===== Erratalist =====
Here is a "PDF file": "erratalist4th.pdf" or an "HTML file":
"erratalist4th.html" with an errata list for the
4th edition of the book. If you find any typo or error, please
report it to "the author": "mailto:[email protected]".
===== Slides =====
There is a "slide collection": "slides/index.html"
from lectures based on the latest edition of the book.
------------
======= The 3rd edition =======
<a href="http://www.amazon.com/Scientific-Programming-Computational-Science-Engineering/dp/3642302920/ref=sr_1_4?ie=UTF8&qid=1344338912&sr=8-4&keywords=langtangen+primer"><img border="0" width="130" src="figs/Primer_pic.jpg"></a>
===== All programs from the book =====
On Unix/Linux or Mac, download
the tarfile "`book-examples-3rd.tar.gz`": "book-examples-3rd.tar.gz"
for the 3rd edition and pack it out by
!bc sys
tar xvzf book-examples-3rd.tar.gz
!ec
On Windows, download "`book-examples-3rd.zip`": "book-examples-3rd.zip"
for the 3rd edition and pack it out by
!bc sys
unzip book-examples-3rd.zip
!ec
or double click on the file icon.
The result is a folder (directory)
tree `src` with subfolders containing
the program examples for different chapters in the book
(`formulas`, `looplist`, etc., as explained in the introduction to
each chapter).
You can also directly access the latest version of the example
files at "GitHub": "https://github.com/hplgit/scipro-primer", see
the "src-3rd": "https://github.com/hplgit/scipro-primer/tree/master/src-3rd"
directory (to download a file, click the *Raw* button on the right first
to get the pure text file in the browser and then right-click to download).
To copy the whole repository to your computer, run
!bc sys
git clone https://github.com/hplgit/scipro-primer.git
!ec
===== Software installation =====
The "old software description": "install.html" is now outdated, so we
refer to the "new one": "http://hplgit.github.io/edu/accesspy/accesspy_primer4.html" that appears in the 4th edition.
You may want to install SciTools directly from its Mercurial version control
repository. This makes it easy to upgrade the package at any time.
SciTools is hosted at "Googlecode": "https://github.com/hplgit/scitools/".
Make sure you have the Mercurial (<tt>hg</tt>) version control system
on your computer (if not, do `sudo pip install mercurial` on Linux or Mac,
and `pip install mercurial` in a Windows Command Prompt or Power Shell window).
Get the SciTools source code and install it by
!bc sys
hg clone https://[email protected]/p/scitools/
cd scitools
sudo python setup.py install
!ec
Whenever you want to upgrade the package, just go to the `scitools`
folder and run the commands
!bc sys
hg pull
hg update
sudo python setup.py install
!ec
===== Software installation on Ubuntu =====
If you have an Ubuntu installation, Python is already there. The minimum
extra packages are installed by this command:
!bc sys
sudo apt-get install python-matplotlib python-scipy python-gnuplot gnuplot gnuplot-x11 python-scitools
!ec
A comprehensive installation with lots of useful packages can be
performed by a "Bash script": "https://raw.github.com/hplgit/vagrantbox/master/doc/src/vagrant/src-vagrant/install_rich.sh". Download this file (`install_rich.sh`) and run it by `bash install_rich.sh`.
===== Erratalist =====
There is a "PDF file": "erratalist3rd.pdf" with an errata list for the
3rd edition of the book.
===== Slides =====
There is a "slide collection": "http://www.ifi.uio.no/~inf1100/slides"
from lectures based on the *latest edition* edition of the book.
======= The 1st and 2nd edition =======
The resource page for the first two editions is located
"elsewhere": "http://vefur.simula.no/intro-programming".