Introduction to Python

An important part of MA2501 Numerical Methods is the implementation of numerical methods as computer programs. For that we will use Python, a multi-purpose programming language which offers an extensive computing environment designed for numerical computations.

Python is already installed at certain computer labs at NTNU. You may also install it on your own computer.

Installing Python

Python is free and can be downloaded from the internet. All the relevant packages for numerical computation can be installed by downloading the Anaconda launcher.

Learning Python

There are plenty of resources for learning Python. We recommend the following textbooks:

  • Magnus Lie Hetland, Beginning Python, Apress (2017) Available online
  • Robert Johansson, Numerical Python, Apress (2015) Available online
  • Svein Linge, Hans Petter Langtangen, Programming for Computations - Python, Springer (2016) Available online
  • Hans Petter Langtangen, A Primer on Scientific Programming with Python, Springer (2016) Available online
  • Hans Petter Langtangen, Python Scripting for Computational Science, Springer (2008) Available online

The three first ones are quite basic and give a comprehensive introduction to Python and its usage for scientific computation. For further documentation on matplotlib, NumPy and SciPy, we recommend the following internet sites:

2018-01-19, Abdullah Abdulhaque