Prepared for SciPy 2026
Authors: John Stachurski, Smit Lunagariya, Matt McKay
The tutorial demonstrates how to accelerate simulations using modern Python tools.
It focuses on Thomas Schelling's segregation model as our running example to explore acceleration tools like Numba and JAX.
The Schelling segregation model shows how mild individual preferences can lead to extreme aggregate outcomes. We study:
- The basic model — Understanding the dynamics of racial segregation using Python classes
- NumPy implementation — Rewriting the model with arrays and functions for clarity and speed
- JAX implementation — Translating the model to JAX syntax and concepts
- Further parallelization — How can we exploit modern parallel hardware (e.g., GPUs)
- Python 3.13
- Anaconda
- GPU support (optional, for JAX acceleration)
See environment.yml for the full list of dependencies.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.