Skip to content

Create new examples or benchmarks¤

Probdiffeq hosts numerous examples and benchmarks. The differences between examples and benchmarks are minimal: they are all Python scripts (which become Jupyter notebook files in the final docs), and each demonstrates one functionality.

  • Examples show what probdiffeq offers

  • Benchmarks show how well it performs, often compared to other solver libraries.

Each example or benchmark should run in under a minute; most run in a few seconds. New contributions are welcome!

Steps¤

  1. Create the script: Create a new notebook in the appropriate subdirectory of examples/ or benchmarks/. Choose a meaningful name (e.g., benchmarks/work-precision-hires.py, examples/demonstrate-calibration.py). The examples show up in the documentation according to alphabetical order in the examples/ and benchmarks directories.

  2. Fill the script: Write the benchmark/example code. Ensure the execution time stays well below one minute to keep CI manageable.

  3. Write documentation: The module docstring will become the title and description of the notebook, so choose a good one.

  4. Make a pull request: Commit the new file (the pre-commit hook will handle formatting and linting). Open a pull request, and you're done.