About the Scientific Python Lectures

Release: 2024.2rc0.dev0

https://zenodo.org/badge/doi/10.5281/zenodo.594102.svg

Authors

Editors

  • Gaël Varoquaux

  • Emmanuelle Gouillart

  • Olav Vahtras

  • Pierre de Buyl

  • K. Jarrod Millman

  • Stéfan van der Walt

Chapter authors

Listed by alphabetical order.

  • Christopher Burns

  • Adrian Chauve

  • Robert Cimrman

  • Christophe Combelles

  • André Espaze

  • Emmanuelle Gouillart

  • Mike Müller

  • Fabian Pedregosa

  • Didrik Pinte

  • Nicolas Rougier

  • Gaël Varoquaux

  • Pauli Virtanen

  • Zbigniew Jędrzejewski-Szmek

  • Valentin Haenel (editor from 2011 to 2015)

Additional Contributions

Listed by alphabetical order

  • Osayd Abdu

  • arunpersaud

  • Ross Barnowski

  • Sebastian Berg

  • Lilian Besson

  • Matthieu Boileau

  • Joris Van den Bossche

  • Michael Boyle

  • Matthew Brett

  • BSGalvan

  • Lars Buitinck

  • Pierre de Buyl

  • Ozan Çağlayan

  • Lawrence Chan

  • Adrien Chauve

  • Robert Cimrman

  • Christophe Combelles

  • David Cournapeau

  • Dave

  • dogacan dugmeci

  • Török Edwin

  • egens

  • Andre Espaze

  • André Espaze

  • Loïc Estève

  • Corey Farwell

  • Tim Gates

  • Stuart Geiger

  • Olivier Georg

  • Daniel Gerigk

  • Robert Gieseke

  • Philip Gillißen

  • Ralf Gommers

  • Emmanuelle Gouillart

  • Julia Gustavsen

  • Omar Gutiérrez

  • Matt Haberland

  • Valentin Haenel

  • Pierre Haessig

  • Bruno Hanzen

  • Michael Hartmann

  • Jonathan Helmus

  • Andreas Hilboll

  • Himanshu

  • Julian Hofer

  • Tim Hoffmann

  • B. Hohl

  • Tarek Hoteit

  • Gert-Ludwig Ingold

  • Zbigniew Jędrzejewski-Szmek

  • Thouis (Ray) Jones

  • jorgeprietoarranz

  • josephsalmon

  • Greg Kiar

  • kikocorreoso

  • Vince Knight

  • LFP6

  • Manuel López-Ibáñez

  • Marco Mangan

  • Nicola Masarone

  • John McLaughlin

  • mhemantha

  • michelemaroni89

  • K. Jarrod Millman

  • Mohammad

  • Zachary Moon

  • Mike Mueller

  • negm

  • John B Nelson

  • nicoguaro

  • Sergio Oller

  • Theofilos Papapanagiotou

  • patniharshit

  • Fabian Pedregosa

  • Philippe Pepiot

  • Tiago M. D. Pereira

  • Nicolas Pettiaux

  • Didrik Pinte

  • Evgeny Pogrebnyak

  • reverland

  • Maximilien Riehl

  • Kristian Rother

  • Nicolas P. Rougier

  • Pamphile Roy

  • Rutzmoser

  • Sander

  • João Felipe Santos

  • Mark Setchell

  • Helen Sherwood-Taylor

  • Shoeboxam

  • Simon

  • solarjoe

  • ssmiller

  • Scott Staniewicz

  • strpeter

  • surfer190

  • Bartosz Telenczuk

  • tommyod

  • Wes Turner

  • Akihiro Uchida

  • Utkarsh Upadhyay

  • Olav Vahtras

  • Stéfan van der Walt

  • Gaël Varoquaux

  • Nelle Varoquaux

  • Olivier Verdier

  • VirgileFritsch

  • Pauli Virtanen

  • Yosh Wakeham

  • yasutomo57jp

What’s new

Release 2024.1 (April 2024)

  • Python 3.10, 3.11, 3.12

  • Renamed Scientific Python Lectures

  • Removed old content

  • Major updates to support recent packages

  • Updates to the SciPy and scikit-image chapters

Release 2022.1 (August 2022)

  • Replace scikit-learn housing example with California data (Marco Mangan)

  • Fix links and typos (Zachary Moon, Tim Gates, Marco Mangan, Gert-Ludwig Ingold)

  • Fix fftpack figure (Osayd Abdu)

  • Update software version (Pierre de Buyl)

Release 2020.2 (September 2020)

  • Replace image i/o from scipy.misc by imageio (Pierre de Buyl)

  • Update information on dict ordering (Bharath Saiguhan)

  • Suppress warnings for mandelbrot example (Pierre de Buyl)

  • Update NumPy introduction and advanced usage for changes to NumPy: wording, bytes representation, floating point argument to np.zeros (Ross Barnowski)

  • Fix links to NumPy documentation to use numpy.org (Ross Barnowski)

  • Update note on transposed arrays (Ross Barnowski with Eric Wieser)

  • Use generated figure file for lidar data processing (Lawrence Chan)

  • Update link from PyMC2 to PyMC3 (B. Hohl)

  • Fix transparent popup menu to have a background (Pierre de Buyl)

Release 2020.1 (March 2020)

  • Fix outdated URLs (Gert-Ludwig Ingold)

  • Update packages (Pierre de Buyl)

  • Remove Python 2 continuous integration (Olav Vahtras - EuroSciPy 2019 sprint)

  • Fix chessboard size (Mark Setchell)

  • Add objectives and design choices (Gert-Ludwig Ingold and Pierre de Buyl)

  • Make the numpy advanced iterator example more elaborate (Sebastian Berg)

  • Use empty list instead of empty tuple to deactivate ticks (Tim Hoffmann)

  • Fix typos (Sander van Rijn, cydave, Michel Corne) and off by 2 errors (Andreas Hilboll)

  • Improve readability of Polynomials example code (Michel Corne)

  • Replace suggestions for debugging environments (Gert-Ludwig Ingold)

  • Add section on Python 2 vs Python 3 (Pierre de Buyl)

Release 2019.1 (May 2019)

  • Update matplotlib compatibility to version 2.2 (Mike Mueller, Joris Van den Bossche, Pierre de Buyl)

  • Make C-API example cos_module_np Python 2/3 compatible (Michael Boyle)

  • Fix typos and outdated URLs (Dogacan Dugmeci, Matthieu Boileau, Stuart Geiger, Omar Gutiérrez, Himanshu, Julian Hofer, Joseph Salmon, Manuel López-Ibáñez, Nicola Masarone, michelemaroni89, Evgeny Pogrebnyak, tommyod)

Release 2018.1 (September 2018)

  • Fix wordings, typos, colours (Pierre de Buyl, Greg Kiar, Olav Vahtras Kristian Rother)

  • Fix interpolation example code (Scott Staniewicz)

  • Fix CSS for high density displays (Gaël Varoquaux)

  • Generate indexing figures with PyX (Gert Ingold)

  • Warn clearly against the use of Python 2 (Bruno Hanzen)

  • Update external links (Bruno Hanzen)

  • Update versions of dependencies: sphinx-gallery, pandas, statsmodels (Gaël Varoquaux)

Release 2017.1 (October 2017)

  • Update optimization chapter (Michael Hartmann, Gaël Varoquaux)

  • Update SymPy chapter (Vince Knight)

  • Update advanced NumPy (Bartosz Teleńczuk)

  • Update scikit-learn chapter (Gaël Varoquaux)

  • Update SciPy chapter (Gaël Varoquaux)

  • Make ‘>>>’ in the prompts unselectable (Pierre de Buyl)

  • Use common package requirements for pip and conda and improve the build instructions (Gert-Ludwig Ingold, Vince Knight, Pierre de Buyl)

  • Set up Circle CI (Loïc Estève)

  • Improved support for Python 3 integer divisions and calls to print (Loïc Estève, Gert-Ludwig Ingold, Pierre de Buyl, Gaël Varoquaux)

  • Change test runner to pytest (Pierre de Buyl)

  • Replace the plot directive by sphinx-gallery (Gert-Ludwig Ingold)

Release 2016.1 (September 2016)

  • Rework of intro chapter (Gaël Varoquaux)

  • Integrate sphinx-gallery: examples are now Jupyter notebooks (Gaël Varoquaux, Gert-Ludwig Ingold, Óscar Nájera)

  • Better Python 3 tests and support (Gert-Ludwig Ingold)

  • Adapt examples to Matplotlib 1.5 (Gaël Varoquaux)

  • Modernize numpy chapter (Bartosz Telenczuk)

Release 2015.3 (November 2015)

  • Collapsed sidebar can now pop up for mid-sized display (Gaël Varoquaux)

  • Replaced pictures of Lena by raccoon face (Thouis Jones)

Release 2015.2 (October 2015)

  • Authors on cover ordered as in bibtex entry (Nicolas Rougier)

  • Better rendering on mobile (Gaël Varoquaux)

  • Fix restructured text markup errors (Olav Vahtras)

Release 2015.1 (September 2015)

  • New chapter on statistics with Python (Gaël Varoquaux)

  • Better layout in PDF (Gaël Varoquaux)

  • New HTML layout, simplified formatting, mobile-friendly and sidebar (Gaël Varoquaux, Nelle Varoquaux)

  • Logos on the HTML front page and on the PDF cover (Nicolas Rougier)

  • Python 3 compatible code (Gaël Varoquaux, Olav Vahtras)

  • Code put up to date for more recent versions of project (Pierre de Buyl, Emmanuelle Gouillart, Gert-Ludwig Ingold, Nicolas Pettiaux, Olav Vahtras, Gaël Varoquaux, Nelle Varoquaux)

  • Matplotlib updated with removal of deprecated pylab interface (Nicolas Rougier)

Release 2013.2 (21 August 2013)

  • NumPy chapter simplified (Valentin Haenel)

  • New layout for the HTML rendering (Gaël Varoquaux)

Release 2013.1 (10 Feb 2013)

  • Improvements to the advanced image manipulation chapter (Emmanuelle Gouillart)

  • Upgrade of the introductory language chapter (Valentin Haenel)

  • Upgrade of the introductory numpy chapter (Valentin Haenel)

  • New advanced chapter on interfacing with C (Valentin Haenel)

  • Minor fixes and improvements in various places (Robert Gieseke, Ozan Çağlayan, Sergio Oller, kikocorreo, Valentin Haenel)

Release 2012.3 (26 Nov 2012)

This release integrates the changes written for the Euroscipy conference:

  • Matplotlib chapter completely redone (Nicolas Rougier, Gaël Varoquaux)

  • New advanced chapter on mathematical optimization (Gaël Varoquaux)

  • Mayavi chapter redone (Gaël Varoquaux)

  • Front page layout slightly improved: folding TOC (Gaël Varoquaux)

Release 2012.2 (22 Jun 2012)

Minor release with a few clean ups (Gael Varoquaux).

Release 2012.1 (20 Jun 2012)

This is a minor release with many clean ups. In particular, clean up of the layout (Gael Varoquaux), shortening of the numpy chapters and deduplications across the intro and advanced chapters (Gael Varoquaux) and doctesting of all the code (Gael Varoquaux).

Release 2012.0 (22 Apr 2012)

This is a minor release with a few clean ups. In particular, clean up the scikit-learn chapter (Lars Buitinck), more informative section titles (Gael Varoquaux), and misc fixes (Valentin Haenel, Virgile Fritsch).

Release 2011.1 (16 Oct 2011)

This release is a reworked version of the Euroscipy 2011 tutorial. Layout has been cleaned and optimized (Valentin Haenel and many others), the Traits chapter has been merged in (Didrik Pinte)

Release 2011 (1 Sept 2011)

This release is used for the Euroscipy 2011 tutorial. The numpy introductory chapter has been rewamped (Pauli Virtanen). The outline of the introductory chapters has been simplified (Gaël Varoquaux). Advanced chapters have been added: advanced Python constructs (Zbigniew Jędrzejewski-Szmek), debugging code (Gaël Varoquaux), optimizing code (Gaël Varoquaux), image processing (Emmanuelle Gouillart), scikit-learn (Fabian Pedregosa).

License

All code and material is licensed under a

Creative Commons Attribution 4.0 International License (CC-by)

https://creativecommons.org/licenses/by/4.0/

See the AUTHORS.rst file for a list of contributors.

Contributing

The Scientific Python Lectures are a community-based effort and require constant maintenance and improvements. New contributions such as wording improvements or inclusion of new topics are welcome.

To propose bugfixes or straightforward improvements to the lectures, see the contribution guide below.

For new topics, read the objectives first and open an issue on the GitHub project to discuss it with the editors.

Objectives and design choices for the lectures

Contributors should keep the following objectives and design choices of the Scientific Python Lectures in mind.

Objectives:

  • Provide a self-contained introduction to Python and its primary computational packages, the ”Scientific Python stack“.

  • Provide tutorials for a selection of widely-used and stable computational libraries. Currently, we cover pandas, statmodels, seaborn, scikit-image, scikit-learn, and sympy.

  • Automated testing is applied to the code examples as much as possible.

Design choices:

  • Each chapter should provide a useful basis for a 1‒2 h tutorial.

  • The code should be readable.

  • An idomatic style should be followed, e.g. import numpy as np, preference for array operations, PEP8 coding conventions.

Contributing guide

The directory guide contains instructions on how to contribute:

Building instructions

To generate the html output for on-screen display, Type:

make html

the generated html files can be found in build/html

The first build takes a long time, but information is cached and subsequent builds will be faster.

To generate the pdf file for printing:

make pdf

The pdf builder is a bit difficult and you might have some TeX errors. Tweaking the layout in the *.rst files is usually enough to work around these problems.

Requirements

Build requirements are listed in the requirements file:

numpy==1.26.4
scipy==1.13.0
matplotlib==3.8.4
pandas==2.2.2
patsy==0.5.6
pyarrow==16.0.0
scikit-learn==1.4.2
scikit-image==0.23.2
sympy==1.12
statsmodels==0.14.2
seaborn==0.13.2
pytest>=8.2
sphinx>=7.3
sphinx-gallery>=0.16
sphinx-copybutton
coverage>=7.5
Pillow
pooch
ipython
pickleshare
pre-commit==3.7.0
requests
sphinxcontrib-jquery

Ensure that you have a virtual environment or conda environment set up, then install requirements with:

pip install -r requirements.txt

Note that you will also need the following system packages:

  • Python C development headers (the python3-dev package on Debian, e.g.),

  • a C compiler like gcc,

  • GNU Make,

  • a full LaTeX distribution such as TeX Live (texlive-latex-base, texlive-latex-extra, texlive-fonts-extra, and latexmk on Debian/Ubuntu),

  • dvipng,

  • latexmk,

  • git.

Updating the cover

Use inkscape to modify the cover in images/, then export to PDF:

inkscape --export-filename=cover-2024.pdf cover-2024.svg

Ensure that the images/cover.pdf symlink points to the correct file.