Python Scripting for Computational Science

Front Cover
Springer Science & Business Media, 2008 - Computers - 750 pages
6 Reviews
Numerous readers of the second edition have noti?ed me about misprints and possible improvements of the text and the associated computer codes. The resulting modi?cations have been incorporated in this new edition and its accompanying software. The major change between the second and third editions, however, is caused by the new implementation of Numerical Python, now called numpy. The new numpy package encourages a slightly di?erent syntax compared to the old Numeric implementation, which was used in the previous editions. Since Numerical Python functionality appears in a lot of places in the book, there are hence a huge number of updates to the new suggested numpy syntax, especially in Chapters 4, 9, and 10. The second edition was based on Python version 2.3, while the third edition contains updates for version 2.5. Recent Python features, such as generator expressions (Chapter 8.9.4), Ctypes for interfacing shared libraries in C (Chapter 5.2.2), the with statement (Chapter 3.1.4), and the subprocess module for running external processes (Chapter 3.1.3) have been exempli?ed to make the reader aware of new tools. Chapter 4.4.4 is new and gives a taste of symbolic mathematics in Python.
  

What people are saying - Write a review

User ratings

5 stars
4
4 stars
2
3 stars
0
2 stars
0
1 star
0

User Review - Flag as inappropriate

Most of the book is absolutely great. The downloadable base of utilities is a great set of examples that also proves useful in everyday life. The examples are well thought through and not, as in many other books, just continuations of a fairly useless codebase that tries to make every aspect of Python clear through one use(less) case. The order of the chapters seems somewhat odd at first. In the end it looks like a well designed build-up of complexity, with only a little price to pay (some tiny bits of repetition and to experienced users sometimes unclear where to find what). Although knowledge of Python is not necessary, there is not a lot of space in the book wasted on the basics (previous experience in programming is, in fact, helpful). The book is oriented towards scientists and engineers, with a lot of code ready in C/C++/Fortran who need to glue that code together and possibly do some additional numerical or analysis work on the data. It is also perfectly suited for people who want to use only Python for their (numerical and analysis) work. Topics covered: 1) Basic Python (clean, clear, quick, some more than usual emphasis on handy I/O functionality) 2) Advanced Python (clear, many more useful extras like regular expressions, parsing command line options, iterators, etc. than in many other books, good examples, missing topic: decorators) 3) NumPy and numeric analysis (extensive, very good, could have had more on SciPy, some emphasis on older/obsolete packages like Numeric, ScientificPython, not enough on e.g. Matplotlib) 3) Interfacing with C/C++/Fortran through arrays (very useful and well explained) 4) GUI programming (clear, maybe a bit too much of advanced GUI programming, which could have been figured out by interested users by themselves, seems like too much emphasis for this topic) 5) cgi programming/web interfaces (nice little extra gadget in my opinion, most scientists won't necessarily use this). One feature that highly surprised me was the preferred use of from name import *, which I think is a bad habit. At some point it is even presented as useful when the same function name gets redefined in the global namespace, which I think is not something you want people to do. Other than that: great book and definitely worth its price! 

User Review - Flag as inappropriate

Muito, muito bom e completo.
Very good.

Contents

I
1
II
2
III
4
IV
5
V
6
VI
7
VII
8
VIII
9
CLXXXIX
324
CXC
326
CXCII
329
CXCIII
331
CXCIV
334
CXCV
335
CXCVI
339
CXCVII
344

IX
11
X
12
XI
13
XII
14
XIII
16
XIV
17
XV
19
XVI
20
XVII
21
XVIII
22
XIX
26
XX
28
XXI
29
XXII
32
XXIV
33
XXVI
36
XXVII
37
XXVIII
39
XXIX
42
XXX
43
XXXI
46
XXXII
47
XXXIII
49
XXXV
50
XXXVI
51
XXXVII
53
XXXVIII
56
XXXIX
58
XL
59
XLI
60
XLII
61
XLIII
63
XLIV
66
XLVI
68
XLVII
69
XLVIII
71
XLIX
74
LI
75
LII
76
LIII
78
LIV
80
LV
81
LVI
82
LVIII
83
LIX
85
LX
91
LXI
94
LXII
95
LXIII
97
LXIV
99
LXV
101
LXVI
105
LXVII
106
LXVIII
110
LXIX
111
LXX
112
LXXI
113
LXXII
114
LXXIII
116
LXXIV
117
LXXV
118
LXXVII
119
LXXVIII
120
LXXIX
121
LXXX
122
LXXXII
123
LXXXIII
125
LXXXIV
131
LXXXV
132
LXXXVII
136
LXXXVIII
138
LXXXIX
139
XC
142
XCI
144
XCII
145
XCIII
146
XCIV
147
XCVI
149
XCVII
150
XCVIII
151
XCIX
152
C
153
CI
154
CII
157
CIII
159
CIV
163
CV
166
CVI
168
CVII
173
CIX
178
CX
183
CXI
184
CXII
186
CXIII
189
CXIV
190
CXVI
192
CXVII
194
CXVIII
195
CXIX
201
CXX
208
CXXI
210
CXXII
214
CXXIII
215
CXXIV
216
CXXV
217
CXXVII
218
CXXVIII
222
CXXIX
223
CXXX
227
CXXXI
228
CXXXIII
230
CXXXIV
233
CXXXV
234
CXXXVI
238
CXXXVII
240
CXXXVIII
241
CXXXIX
243
CXL
245
CXLI
247
CXLII
248
CXLIII
250
CXLV
253
CXLVI
256
CXLVII
257
CXLVIII
259
CXLIX
260
CL
262
CLII
264
CLIV
265
CLVI
266
CLVII
267
CLVIII
269
CLX
272
CLXI
274
CLXII
275
CLXIII
276
CLXIV
278
CLXVI
280
CLXVII
281
CLXVIII
282
CLXIX
284
CLXX
286
CLXXI
289
CLXXII
295
CLXXIII
296
CLXXIV
297
CLXXV
299
CLXXVI
301
CLXXVII
302
CLXXVIII
304
CLXXIX
306
CLXXXI
308
CLXXXII
309
CLXXXIII
311
CLXXXIV
313
CLXXXV
316
CLXXXVI
319
CLXXXVII
322
CLXXXVIII
323
CXCVIII
345
CXCIX
347
CC
348
CCI
351
CCII
353
CCIII
354
CCIV
362
CCVI
364
CCVII
366
CCIX
367
CCX
368
CCXI
371
CCXIV
374
CCXV
375
CCXVI
376
CCXVII
377
CCXVIII
378
CCXX
380
CCXXI
382
CCXXIII
384
CCXXV
388
CCXXVI
389
CCXXVII
390
CCXXIX
391
CCXXX
392
CCXXXI
393
CCXXXII
394
CCXXXIV
395
CCXXXV
396
CCXXXVI
399
CCXXXVII
403
CCXXXVIII
409
CCXXXIX
413
CCXLI
415
CCXLII
416
CCXLIII
418
CCXLIV
419
CCXLV
420
CCXLVI
421
CCXLVIII
423
CCXLIX
427
CCL
428
CCLI
432
CCLII
436
CCLIII
437
CCLV
441
CCLVI
442
CCLVII
445
CCLVIII
451
CCLIX
453
CCLX
454
CCLXI
455
CCLXII
457
CCLXIV
459
CCLXVI
466
CCLXVII
470
CCLXIX
471
CCLXX
473
CCLXXI
474
CCLXXII
478
CCLXXIII
479
CCLXXIV
483
CCLXXV
484
CCLXXVI
485
CCLXXVII
486
CCLXXVIII
487
CCLXXIX
488
CCLXXX
489
CCLXXXI
491
CCLXXXII
492
CCLXXXIII
493
CCLXXXIV
494
CCLXXXV
496
CCLXXXVI
497
CCLXXXVII
499
CCLXXXVIII
500
CCLXXXIX
502
CCXC
503
CCXCI
506
CCXCIII
508
CCXCIV
511
CCXCV
519
CCXCVII
523
CCXCVIII
524
CCXCIX
525
CCC
529
CCCI
530
CCCII
536
CCCIII
538
CCCIV
539
CCCV
541
CCCVI
542
CCCVII
544
CCCVIII
547
CCCIX
550
CCCX
551
CCCXI
552
CCCXII
556
CCCXIII
557
CCCXIV
559
CCCXV
560
CCCXVI
564
CCCXVII
566
CCCXVIII
567
CCCXIX
569
CCCXX
583
CCCXXI
584
CCCXXII
585
CCCXXIII
586
CCCXXIV
588
CCCXXV
589
CCCXXVI
590
CCCXXVII
596
CCCXXVIII
601
CCCXXIX
604
CCCXXX
606
CCCXXXI
609
CCCXXXII
614
CCCXXXIII
618
CCCXXXVI
623
CCCXXXVII
629
CCCXXXIX
633
CCCXL
640
CCCXLI
641
CCCXLII
644
CCCXLIII
651
CCCXLIV
657
CCCXLV
663
CCCXLVI
666
CCCXLVII
674
CCCXLVIII
677
CCCXLIX
678
CCCL
679
CCCLI
680
CCCLII
681
CCCLIII
683
CCCLIV
684
CCCLVI
685
CCCLVIII
689
CCCLIX
693
CCCLX
694
CCCLXI
696
CCCLXIII
698
CCCLXIV
702
CCCLXV
706
CCCLXVI
711
CCCLXVIII
715
CCCLXIX
719
CCCLXX
720
CCCLXXI
724
CCCLXXII
726
CCCLXXIII
728
CCCLXXIV
729
CCCLXXV
732
CCCLXXVI
734
CCCLXXVII
739
CCCLXXVIII
741
Copyright

Common terms and phrases

References to this book