Skip to content

aeberspaecher/PythonForScientists

Repository files navigation

Python Programming for Scientists

About

This are the sources for a talk the author (Alexander Eberspächer) has given at the informal student's seminar at the X. informal Billiard Workshop of the German Research Unit 760 at Riezlern, Kleinwalsertal. A slightly enhanced version has been presented to our working group, too.

The presentation meant to be both a very short introduction to the Python programming language as well as a short demonstration of advanced topics such as use of scientific packages (NumPy, SciPy). Python as a glue language was targeted, too. So the talk tried to kill two birds with one stone: it tried to introduce Python to people without prior exposure and it also tried to show some advanced topics to experienced Python users. Wrapping other languages was introduced with the aim of speeding Python computations up.

Slides

If you are only interested in the pdf slides, here's a direct link: https://github.com/aeberspaecher/PythonForScientists/raw/master/pdf/talk.pdf

Dependencies

You'll need Pygments for the syntax highlighted LaTeX snippets to work.

Building

Use waf to build the talk:

./waf configure
./waf build

This will automatically check if you have all tools needed (pdflatex, pygments). The pdf file is created in the pdf build directory.

Notes

In the directory Pygsnippets you'll find the code snippets that appear on the slides, too.

The folder Code contains the code I have used for the benchmarks. The Cython and f2py files contain some hints on the creation of shared objects.

In comparison to slides I used in the Riezlern talk, there are some new slides. Additionally, minor bugs have been fixed. Let me know if you find more. The new slides are a bit more advertising Python as the old ones did.

A note on style: the slides show some Python like return np.sinc(x[:])**2 with x being a NumPy array. Yes, of course the slice operator [:] part is unnecessary and slows everything up (a bit). However, I just like this synatx as it really makes clear that x is an array. I guess I aquired this habit doing a lot of Fortran over the past years.

Some references

Scientific Python

OpenMP

mpi4py

Some further links

Python in teaching

Software engineering

An aspect of daily work everyone of us can greatly benefit from...

About

A presentation on "Python programming for Scientists"

Resources

Stars

Watchers

Forks

Packages

No packages published