Astrophysics II : interactions radiation-matter
PHYS-472
Learning Python and its main packages
This page is part of the content downloaded from Learning Python and its main packages on Sunday, 25 January 2026, 03:21. Note that some content and any files larger than 50 MB are not downloaded.
Description
A selection of resources to learn Python, NumPy, SciPy and Matplotlib, for all levels
Page content
Learning Python
One of the advantages of Python is that it is easy to learn and read. It is not compiled, the syntax is only based on indentation, variables don't have to be defined with a type, memory is managed automatically, etc. It is also similar in idea to e.g. Matlab or Octave if you have used that before. To get started, here are a few useful resources to learn the basics:
- https://www.learnpython.org/ Has lots of interactive exercises that you can run directly on the webpage, so you can even try it out without having installed Python. It covers all the base functions of the language.
- https://www.astro.unige.ch/doc/rst/Tutorials/python3.html The tutorial made by EPFL's astrophysics laboratory. This page covers both Python (extensively) and its three most important packages: NumPy, Matplotlib, and SciPy
- https://docs.python.org/3/tutorial/ The official tutorial. It's well-made and gives you lots of info, but you need to have access to a python installation (either through Noto or on your machine) to try out the code for yourself. Once you're comfortable with the basics, you can take a look at the full official documentation of Python.
- https://numpy.org/learn/ The official NumPy webpage contains a very complete list of resources to learn how to use this fundamental package of python. You can check out different tutorials and decide which one you like best!