Book contents
- Frontmatter
- Contents
- Preface to the Second Edition
- Preface to the First Edition
- 1 Introduction
- 2 Getting Started with IPython
- 3 A Short Python Tutorial
- 4 NumPy
- 5 Two-Dimensional Graphics
- 6 Multi-Dimensional Graphics
- 7 SymPy: A Computer Algebra System
- 8 Ordinary Differential Equations
- 9 Partial Differential Equations: A Pseudospectral Approach
- 10 Case Study: Multigrid
- Appendix A Installing a Python Environment
- Appendix B Fortran77 Subroutines for Pseudospectral Methods
- References
- Hints for Using the Index
- Index
Preface to the First Edition
Published online by Cambridge University Press: 02 August 2017
- Frontmatter
- Contents
- Preface to the Second Edition
- Preface to the First Edition
- 1 Introduction
- 2 Getting Started with IPython
- 3 A Short Python Tutorial
- 4 NumPy
- 5 Two-Dimensional Graphics
- 6 Multi-Dimensional Graphics
- 7 SymPy: A Computer Algebra System
- 8 Ordinary Differential Equations
- 9 Partial Differential Equations: A Pseudospectral Approach
- 10 Case Study: Multigrid
- Appendix A Installing a Python Environment
- Appendix B Fortran77 Subroutines for Pseudospectral Methods
- References
- Hints for Using the Index
- Index
Summary
I have used computers as an aid to scientific research for over 40 years. During that time, hardware has become cheap, fast and powerful. However, software relevant to the working scientist has become progressively more complicated. My favourite textbooks on Fortran90 and C++ run to 1200 and 1600 pages respectively. And then we need documentation on mathematics libraries and graphics packages. A newcomer going down this route is going to have to invest significant amounts of time and energy in order to write useful programmes. This has led to the emergence of “scientific packages” such as Matlab® or Mathematica® which avoid the complications of compiled languages, separate mathematics libraries and graphics packages. I have used them and found them very convenient for executing the tasks envisaged by their developers. However, I also found them very difficult to extend beyond these boundaries, and so I looked for alternative approaches.
Some years ago, a computer science colleague suggested that I should take a look at Python. At that time, it was clear that Python had great potential but a very flaky implementation. It was, however, free and open-source, and was attracting what has turned out to be a very effective army of developers. More recently, their efforts have coordinated to produce a formidable package consisting of a small core language surrounded by a wealth of add-on libraries or modules. A select group of these can and do replicate the facilities of the conventional scientific packages. More importantly an informed, intelligent user of Python and its modules can carry out major projects usually entrusted to dedicated programmers using Fortran, C etc. There is a marginal loss of execution speed, but this is more than compensated for by the vastly telescoped development time. The purpose of this book is to explain to working scientists the utility of this relatively unknown resource.
Most scientists will have some computer familiarity and programming awareness, although not necessarily with Python, and I shall take advantage of this. Therefore, unlike many books which set out to “teach” a language, this one is not just a brisk trot through the reference manuals.
- Type
- Chapter
- Information
- Python for Scientists , pp. xiii - xivPublisher: Cambridge University PressPrint publication year: 2017