COOLJAPAN
← All posts

SciRS2 0.1.3 Released — Python Bindings Across the Stack, Plus PCHIP Extrapolation

SciRS2 0.1.3 expands Python (PyO3) bindings across autograd, datasets, graph, io, metrics, ndimage, neural, sparse, text, transform and vision; adds PCHIP linear extrapolation; better manylinux wheels and an Adam scalar fix. 100% Pure Rust on OxiBLAS + OxiFFT.

release scirs2 scientific-computing scipy numpy python pyo3 interpolation pure-rust

The Pure Rust scientific stack now speaks Python — same engine, no native build chain to install.

Today we released SciRS2 0.1.3 — a maintenance and enhancement release that brings Python bindings across the stack, sharper interpolation, and smoother cross-platform builds.

No C. No Fortran. No OpenBLAS. No FFTW. The scientific Python you know — NumPy, SciPy, scikit-learn — leans on a tower of native code: OpenBLAS and LAPACK for linear algebra, FFTW for transforms, all wrapped in C and Fortran you have to compile, link, and keep working across platforms. SciRS2 takes a different path. The Rust core compiles to a single static binary with nothing external to chase down — and as of 0.1.3, Python users get that same Pure Rust engine through PyO3 wheels, with no system BLAS or FFT to install.

Why SciRS2 0.1.3 matters

Anyone who has stood up a fresh scientific Python environment knows the ritual: a pip install that drags in pre-built wheels which may or may not match your platform, or a from-source build that suddenly needs a Fortran compiler, the right OpenBLAS, and a working FFTW. When it breaks, it breaks deep in the native toolchain — far from your actual code. SciRS2 0.1.3 is about removing that whole class of pain while widening what you can reach from Python.

Technical Deep Dive: a Pure Rust engine, now with Python on top

(1) The Rust core, unchanged underneath. Nothing about the foundation moved. Linear algebra runs on OxiBLAS, FFTs run on OxiFFT, and serialization runs on oxicode — all 100% Pure Rust by default. The static binary you ship from Rust is the same engine that now backs the Python wheels.

(2) The PyO3 binding layer. scirs2-python newly exposes the eleven listed modules — autograd, datasets, graph, io, metrics, ndimage, neural, sparse, text, transform, and vision — bringing SciPy/scikit-learn-style surfaces to Python callers. The binding layer is tuned for manylinux wheel generation: removing the automatic pyo3/auto-initialize feature makes the wheels behave better across distributions and improves PyPI compatibility.

(3) The interpolation upgrade. In scirs2-interpolate, PCHIP now extrapolates linearly beyond the data range (Issue #96), with configurable extrapolation modes and improved handling of boundary conditions. Comprehensive regression tests pin the extrapolation behavior so it stays correct.

(4) The autograd correctness fix. In scirs2-autograd, AdamOp::compute previously panicked for scalar parameters (shape []) and 1-element 1-D arrays (shape [1]). Issue #98 is fixed with new is_scalar() and extract_scalar() helpers for robust scalar-array handling, documentation for AdamOptimizer::update_parameter_adam, and regression tests covering scalar, 1-element, and 1×1-matrix parameters — so Adam trains bias terms and other scalar parameters without panicking.

Getting Started

Add the crate to a Rust project — no system libraries required:

cargo add scirs2
use scirs2::prelude::*;

The same engine is available to Python through the scirs2-python PyO3 bindings; the Python import name is simply scirs2. Once the wheel is installed, you can reach the newly-bound modules directly:

import numpy as np
import scirs2

# scirs2 exposes SciPy/scikit-learn-style modules backed by Pure Rust
x = np.array([0.0, 1.0, 2.0, 3.0, 4.0])
y = np.array([0.0, 0.8, 0.9, 0.1, -0.8])

# PCHIP interpolation with the new linear extrapolation beyond the data range
interp = scirs2.interpolate.PchipInterpolator(x, y, extrapolate="linear")
print(interp(np.array([2.5, 5.0])))

# Evaluation metrics from the newly-bound metrics module
y_true = np.array([0, 1, 1, 0, 1])
y_pred = np.array([0, 1, 0, 0, 1])
print("accuracy:", scirs2.metrics.accuracy_score(y_true, y_pred))

What’s New in 0.1.3

Tips

This is the foundation

SciRS2 sits at the heart of a growing COOLJAPAN ecosystem, built on its real Pure Rust dependencies — OxiBLAS for linear algebra, OxiFFT for transforms, and oxicode for serialization. With 0.1.3, the PyO3 bindings turn SciRS2 into a bridge as well as a library: SciPy and scikit-learn users can adopt the Pure Rust engine from Python without rewriting their workflows or wrestling with a native build chain.

Repository: https://github.com/cool-japan/scirs

Star the repo if a Pure Rust scientific stack — now with Python on top — is something you want to see grow.

Pure Rust scientific computing is here — fast, safe, and sovereign.

KitaSan at COOLJAPAN OÜ January 26, 2026

↑ Back to all posts