Python
We assume that you know how to program, and if you are not familiar with Python, you are able to switch to Python. We will use Python 3, version 3.9 or higher. When mandatory assignments demand Python code, you should use this.
Ipython or Jupyter Notebook
We recommend working interactively when working with Python, and for the interactive work we recommend Ipython or Jupyter notebook, which includes Ipython. The IPython package adds a lot of functionality, including auto indent and command completion with the tab key. Also, the help function with ? and ?? are useful, and so are the magic commands. The first group session is an introduction to the Jupyter notebook and various packages we will use.
NumPy and other packages
We will use several Python packages. In particular we will use NumPy and other packages for scientific computing.
IFI machines
On an IFI terminal, the default python is now
opt/ifi/anaconda3/bin/python3
You can start a Python, Ipython or Jupyter notebook session on an IFI machine, and you get access immediate to all these packages.
Remote login
You may login remotely to the IFI-machines when working from home. The recommended solution is currently to use VDI, see
https://www.mn.uio.no/ifi/tjenester/it/hjelp/vdi/ifi-workstation-en.html
/english/services/it/computer/vdi/help/vdi-install-and-use.html?
Installation on your own machine
You may install Python with all the packages to your own PC. This can be done easily with Anaconda or Miniconda. It manages all the packages and dependencies between them and makes it easy to stay updated. It should work on Linux, iOS and Windows. You will get help installing the environment on the first group session. But for they who want a flying start, we have made instructions here.
Documentation
Most of the packages have good online documentation.
The Scipy Lecture Notes contains an introduction to Python for they who know how to program, in addition to descriptions of many of the other tools we will use, including NumPy, Matplotlib.pyplot, Scipy, statistics in Python, and, even, scikit-learn.