Skip to content
Switch branches/tags
Go to file

Latest commit

- link to html and pdf version
- mention opening files if run in JupyterLab

Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Book Deploy

DOI License: CC BY-NC 4.0

Introduction to Python for Computational Science and Engineering

An Introduction to Python for Computational Science and Engineering, developed by Hans Fangohr (2003-2021).

The content and methods taught are intended for a target audience of scientists and engineers who need to use computational methods and data processing in their work, but typically have no prior programming experience or formal computer science training.

The book is available:

The book is based on Python 3.

(A Python 2.7 version is available online)

Why use this book? (Feedback from user)

Readers looking for a beginner's guide to Python are faced with a bafflingarray of choices. However, Introduction to Python for Computational Science and Engineering, by Hans Fangohr is uniquely valuable because it is specifically aimed at those of us who are engaged in applied science or scientific research. The book is concise, well organized and full of practical examples that the reader can implement as they are going along. The key concepts of programming are introduced in the first half of the book, while the second half focuses on science/engineering applications: numerical methods, optimization, scientific plotting, and data science. This book is a must-have companion for anyone learning to use Python to enable their work in applied science or scientific research." - Simon Box, Head of Virtual Development at Aurora Innovation.


The book is available in Portuguese (pdf).


Thanks go to Robert Rosca, Thomas Kluyver, Neil O'Brien, Jacek Generowicz, and Mark Molinari for various contributions (see last chapter for details). Special thanks to all readers, users and students who have provided feedback and corrections.

We acknowledge support from EPSRC (GR/T09156/01 and EP/G03690X/1) and from the OpenDreamKit Horizon 2020 European Research Infrastructures project (#676541).


If you have used these materials and have some feedback (positive or negative), please get in touch with Hans Fangohr.

Favour request and citation

If you are using the book (be it as a teacher in your lecture course, as a student to support your learning, or in any other role), please send a short message to Hans ( . Ideally, this would contain at which university/institution/company you are and how you use the book (in one sentence). This kind of data is useful to support further maintenance and extensions of the materials.

Please use this citation:

For BibTeX:

  doi = {10.5281/ZENODO.1411868},
  url = {},
  author = {Fangohr,  Hans},
  keywords = {Python,  Education,  Textbook,  Computational Science,  Data Science,  Jupyter},
  language = {en},
  title = {Introduction To {Python} For Computational Science And Engineering},
  publisher = {Zenodo},
  year = {2018}


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

The book can be downloaded, used and re-distributed for non-commercial purposes, i.e in particular for education purposes at universities, research institutes and schools. Please send a message to the author if you do so.


Hans Fangohr is a researcher and teacher (see homepage, blog, twitter). His interests include effective software engineering for computational science and data science, researching computational modelling and data analysis methods, and education. He is a Professor at the University of Southampton (UK) and Head of the Scientific Support Unit for Computational Science at the Max Planck Institute for Structure and Dynamics of Matter (Germany).

Historical note: CI was done on Circle CI until 23 August 2018, then switched to Travis CI. A further switch in December 2020 to GitHub workflows.