Thank you to all the contributors for this release!
I merged SciPy v1.18.0 by agriyakhetarpal · Pull Request #586 · pyodide/pyodide-recipes · GitHub last night, marking the first-ever case of SciPy’s WebAssembly counterpart landing on the very day of the upstream SciPy release, in the many years we’ve maintained this recipe and its associated patches! Over the past few releases, we’ve been able to come down from eighteen patches to just six – many thanks to the Herculean efforts on Fortran-to-C translation by @ilayn and co.
SciPy 1.18.0 in Pyodide now has zero remaining (actionable) function signature mismatches, which essentially means that all routines and subpackages are now free from crashes when running the entirety of the SciPy test suite. There are still a few pending cases of slight numerical differences where test tolerances don’t match, and the lack of floating-point exception mode controls in WASM means that a few LinAlgErrors, runtime warnings, and the like are not triggered, but that’s more of a limitation related to the binary format itself. All memory corruption issues have now been resolved.
For subsequent releases: since scipy.odr has been removed in the main branch already, I’ve been spending some time over the past few weeks on a Fortran-compiler-free compilation pipeline (which, in this context, means dropping the use of a WASM f2c and related hacks, and not opting for a Fortran-to-WASM compiler of the likes of LLVM Flang at all), as a means towards improving the upstreamability of the patches and the inculcation of a WASM CI job for the SciPy repository. I’ve gotten promising results by compiling BLIS and semicolon-lapack to WASM already; I have been able to run up to 57% of the test suite before encountering a crash (albeit with various numerical differences, a bit more significant than those observed with our current WASM-compiled OpenBLAS). I will be experimenting with more BLAS and LAPACK flavours over time to assess the best combination that matches our needs. My progress on this front is ongoing.
Overall, I felt this is a story worth sharing here!