Talk Array Manipulation with Numpy


Numpy is a basic tool in scientific computing with Python: it provides the way to conveniently and efficiently deal with homogeneous arrays and datasets. It also provides fundamental mathematical tools such as linear algebra, random numbers, and Fourier transforms.

This tutorial aims to give an idea what basic features Numpy provides, and how to make use of them in scientific computing and engineering. No previous experience with Numpy is required; however, Python basics are assumed to be known, and some experience with scientific computing in general can be useful.

This tutorial introduces:

  • Creating and accessing arrays describing different types of data. Input and output.
  • Basic manipulations: mathematical and statistical operations, slicing in many dimensions, selecting and sorting data, ...
  • Efficiency and elegance: broadcasting, advanced indexing features, and how to write vectorizable code.
  • Brief glance under the hood: shared data and memory layout, views and strides.
  • Cross-section of various routines provided (linear algebra, FFT, string handling, polynomials, ...).

Software requirements:

  • Numpy -- having a recent version >= 1.5 is preferred.
  • Matplotlib -- for illustrations.