About the Scientific Python Lectures¶
Release: 2024.2rc0.dev0
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 idiomatic 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==2.2.0
scipy==1.14.1
matplotlib==3.10.0
pandas==2.2.3
patsy==1.0.1
pyarrow==18.1.0
scikit-learn==1.5.2
scikit-image==0.25.0
sympy==1.13.3
statsmodels==0.14.4
seaborn==0.13.2
pytest>=8.3
sphinx>=8.0
sphinx-gallery>=0.17
sphinx-copybutton
coverage>=7.6
Pillow
pooch
ipython
pickleshare
pre-commit==4.0.1
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:
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.