2026-07-20 –, Room 1.19 (Ground Floor, Shannon)
In this talk I share stories from the surprisingly challenging experience of modernising the LinearOperator data structure in SciPy to include support for batched input and alternative array types. Come and hear what it is like to learn the intricacies of an 18 year old data structure from scratch in order to be able to add new features without breaking the world!
scipy.sparse.linalg.LinearOperator is the data structure which underlies the iterative sparse linear solvers (like conjugate-gradient) in SciPy, as well as matrix factorisation problem algorithms like svds and eigs. I recently undertook a master's project in adding support for batched input and alternative array types to the iterative sparse linear solvers in SciPy, and the first step was to enhance the LinearOperator data structure.
This turned out to be a lot more challenging than first anticipated! The code that has existed for so long had not only retained idiosyncrasies from when it was first implemented, but had also accumulated some inconsistencies over time. The challenge was to figure out how to add the features I needed while avoiding breaking functionality for existing users.
I'll discuss the successes of squaring up the LinearOperator interface with modern initiatives like the array API standard, as well as how I've made us of this new interface in the iterative sparse linear solvers. I'll also mention some of the research results from my investigation into bringing batched sparse linear solvers to Python.
No prior experience is expected for this talk. You can expect to come away from this talk better equipped to make changes to established data structures that are widely used across the world of scientific Python, and with a greater understanding of what it takes to implement support for modern paradigms of performant scientific Python code.
I'm a core maintainer of SciPy and Pixi, and a member of the Consortium for Python Data API Standards. I recently finished a master's degree in Computer Science and Philosophy at the University of Oxford.