Working with data and plotting: numpy

This lesson introduces some techniques for working with data using numpy and producing plots. It covers:

  • A brief introduction to Jupyter notebooks.
  • Introduction to NumPy.
  • Introduction to matplotlib.

Prerequisites:

In order to complete the lesson you should be familar with the content of the course:

  • Introduction to Python

Schedule:

Approximate timings for the lesson:

Time Episode Description
0:00 Jupyter Notebooks How to use a jupyter notebook
0:00 NumPy Introduction An introduction to NumPy
0:25 Tuples, dicts ... Interlude: List like structures in Python
0:40 More NumPy More features of NumPy
1:00 Plotting with NumPy How to plot with NumPy
1:20 Copying and accessing arrays How to copy and access subsets of arrays
1:40 Manipulating Array Manipulating Arrays
2:00 File handling Reading and Writing Files with Numpy
2:30 Vectorisation Vector operations (for free) in Numpy)
3:00 Performance Performance with Python

Additional topics

Features:

Episode Description
Something Random Random numbers in Numpy
Working with Poloynomials Manipulating polynomial representations

More performance:

Episode Description
Numba Numba jit library
Scipy Scipy
Cython Cython

Setup:

Log on to the server for today's course at https://rss.jupyterhub.bath.ac.uk. We will need to make copy the data-plotting folder, which will also use for the notebooks we will generate during the lesson. DO this by opening the Welcome.ipynb notebook and following the set up for Data and plotting. Data and files for the research software courses is available in the folder data-plotting.