Week 3: Python brush-up Anders Roy Plan Lecture today - - PowerPoint PPT Presentation

week 3 python brush up
SMART_READER_LITE
LIVE PREVIEW

Week 3: Python brush-up Anders Roy Plan Lecture today - - PowerPoint PPT Presentation

Week 3: Python brush-up Anders Roy Plan Lecture today Introduction to python packages Introduction to first mandatory assignment Exercises today Finish the exercises from last time 3 new exercises using numpy, scipy and


slide-1
SLIDE 1

Week 3: Python brush-up

Anders Roy

slide-2
SLIDE 2

Plan

  • Lecture today
  • Introduction to python packages
  • Introduction to first mandatory assignment
  • Exercises today
  • Finish the exercises from last time
  • 3 new exercises using numpy, scipy and numba
  • At around 3 PM: The mandatory assigment will be available
  • n the course page
  • Next tuesday
  • Philip Bille presents Massively Parallel Computation.
  • Materials are on the course page – so come prepared.

1

slide-3
SLIDE 3

Installing python packages

  • Use pip to install python packages.
  • If you don’t have it: apt install python3-pip
  • Now you can install Todays 3 packages:
  • pip3 install numpy
  • pip3 install scipy
  • pip3 install numba

2

slide-4
SLIDE 4

Todays packages

  • Numpy: Efficient package for working with matrices, etc.
  • SciPy: Great tools for doing scientific computations.
  • Numba: Speed-up your python scripts using just-in-time

compilation

3

slide-5
SLIDE 5

Plot and find minimum of a function example

3

slide-6
SLIDE 6

Mandatory assignment

3

slide-7
SLIDE 7

Final questions

3