Introduction to Numerical Computing in Python with NumPy

Mar 28, 2023, 4:30 pm6:00 pm
RSVP on My PrincetonU to see location
Princeton students, graduate students, researchers, faculty, and staff


Event Description
This session covers the basics of NumPy, the package that underlies most scientific computing done in Python. It will explain the NumPy array, which is the principal data type in NumPy, and how it differs from similar Python structures like lists. There will be particular emphasis on understanding the two core features of NumPy arrays: vectorization and broadcasting. There will be hands-on exercises.

This session is ideal for those who already use Python and are either new to NumPy or have used NumPy before but would like to develop more comfort with its syntax, underlying data model, and performance features.

Organized by the Princeton Institute for Computational Science and Engineering (PICSciE) and OIT Research Computing. This event is co-sponsored by the Center for Statistics and Machine Learning (CSML).

Learning objectives: Participants will come away with the ability to understand and write NumPy code.

Participants will learn the basic syntax of NumPy arrays, as well as important do's and don'ts for how to use them effectively in their own applications. Participants will also gain awareness of useful NumPy subpackages and leave with enough know-how to incorporate those packages into their own codes.

Knowledge prerequisites: Participants should have a reasonable facility with the Python programming language, and in particular how Python lists work (how to access list elements, slicing notation, the underlying data storage model, etc). This session is not appropriate for those with no prior Python experience. However, no previous experience with NumPy is required.

Hardware/software prerequisites: Participants should install the Anaconda Python 3 distribution which includes Jupyter notebooks and NumPy on their laptops in advance. Instructions can be found on the PICSciE workshops requirements page:

Alternately, participants without Python 3 installed on their laptops who prefer to run Jupyter Notebooks remotely on one of Princeton's systems can do so using the MyAdroit web interface to the Adroit cluster. To access MyAdroit, you should first register for an account on Adroit (, as described in the advance setup guide for PICSciE workshops ( Then, connect to MyAdroit and start a Jupyter session, as described here: