Ebook: Python scripting for computational science
Author: Hans Petter Langtangen (eds.)
- Genre: Mathematics // Computational Mathematics
- Tags: Computational Science and Engineering, Numerical and Computational Methods, Software Engineering/Programming and Operating Systems, Computational Intelligence
- Series: Texts in Computational Science and Engineering 3
- Year: 2008
- Publisher: Springer-Verlag Berlin Heidelberg
- City: Massachusetts
- Edition: 3
- Language: English
- pdf
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.
The goal of this book is to teach computational scientists how to develop tailored, flexible, and human-efficient working environments built from small programs (scripts) written in the easy-to-learn, high-level language Python. The focus is on examples and applications of relevance to computational scientists: gluing existing applications and tools, e.g. for automating simulation, data analysis, and visualization; steering simulations and computational experiments; equipping old programs with graphical user interfaces; making computational Web applications; and creating interactive interfaces with a Maple/Matlab-like syntax to numerical applications in C/C++ or Fortran. In short, scripting with Python makes you much more productive, increases the reliability of your scientific work and lets you have more fun - on Unix, Windows and Macintosh. All the tools and examples in this book are open source codes. The third edition is compatible with the new NumPy implementation and features updated information, correction of errors, and improved associated software tools.