NumPy Tutorial @ EuroSciPy 2019

Goal of this Tutorial

  • Introduce the basics of scientific and numerical computation in Python using Numpy
  • Understand why numpy has a central role in the Python scientific ecosystem

Outline

11:00 - 11:45 (45 mins) Numpy Basics

  • Introduction to NumPy Arrays
    • numpy internals schematics
    • Reshaping and Resizing
  • Numerical Data Types
    • Record Array

11:50 - 12:30 (40 mins) Indexing and Slicing

  • Indexing numpy arrays
    • fancy indexing
    • array masking
  • Slicing & Stacking
  • Vectorization & Broadcasting

Follow up "Advanced NumPy: Bits of Data Science with NumPy

  • Serialisation & I/O
    • .mat files
  • Array and Matrix
    • Matlab compatibility
  • Sparse Matrices
  • Memmap
  • Ubiquitous NumPy: NumPy beyond numpy

Requirements

This tutorial has one main requirement: numpy.

Materials are provided as Jupyter notebooks, so IPython notebook (pip install notebook) is also required.

Advanced Part

This part has more dependencies: scipy, scikit-learn, matplotlib, torch. All these dependencies have been collected in the requirements.txt file:

$ pip install -r requirements.txt

Python version

The minimum recommended version of Python to use for this tutorial is Python 3.5, although Python 2.7 should be fine, as well as previous versions of Python 3.

Py3.5+ is recommended due to a reference to the @ operator in the linear algebra notebook.

MyBinder

If you don't want to bother setting up the environment on your own computer, you can use MyBinder

(Note: recommended only with a proper Wi-Fi connection)