Contribute Media
A thank you to everyone who has made this possible: Read More

NumPy (2/2)


NumPy forms the basis of the scientific ecosystem of Python by providing a new data type, the ndarray. This type allows to represent multi-dimensional homogeneous data as they appear in many scientific applications in the form of vectors and matrices or, for example, images. The use of NumPy arrays allows to significantly speed up numerical calculations in Python and, in addition, permits to write more succinct and readable code.

In this tutorial, we will discuss the basic concepts of ndarrays and, in particular, how they can be indexed to efficiently work with multi-dimensional data. We will learn how to manipulate ndarrays with NumPy and explore how typical numerical tasks can be solved either with NumPy or other packages from the Python scientific ecosystem like SciPy (which will be covered in more detail in a subsequent tutorial).

A basic knowledge of Python, at least on the level of the introductory tutorial on Python, is expected. Some familiarity with the slicing syntax of Python lists will be useful.

For the NumPy tutorial, it will be sufficient to have installed the packages mentioned on the top of this page.

Teaching material is available from Github. Make sure that you download the Jupyter notebook containing the exercises.


Improve this page