Hello everyone!
I’m excited to announce the first release of SciJo, a high-performance scientific computing library for Mojo!
What is SciJo?
SciJo brings SciPy-like functionality to Mojo, with native performance and strong type safety.
I’ve been using Mojo extensively in my research, and over time, I began consolidating the utilities I developed into a single, cohesive library. That effort evolved into SciJo, an open project with the ambitious goal of bringing the full range of SciPy capabilities to Mojo.
SciJo builds on NuMojo for array operations, making NuMojo and SciJo together a powerful foundation for scientific computing in Mojo.
While we’re just getting started, v0.1 already includes several core modules ready to use today.
What’s Included in v0.1
Numerical Differentiation
- Central, forward, and backward finite differences
- Adaptive step size refinement with Richardson extrapolation
- Multiple accuracy orders (1-6 for forward/backward, 2-8 for central)
∫ Integration
quad: Gauss-Kronrod quadrature (QUADPACK QNG algorithm)trapezoid: Classic trapezoidal rule for uniform/non-uniform grids
Interpolation
interp1d: Linear interpolation with extrapolation support- Fully compatible with NuMojo arrays
FFT
fft/ifft: Fast Fourier Transform using Cooley-Tukey algorithm- NumPy-compatible conventions for easy migration
- Support for complex arrays (power-of-2 sizes)
Physical Constants
- CODATA 2022 fundamental constants
- Values, units, and uncertainties included
- Drop-in replacement for
scipy.constants
Quick Example
import scijo as sj
from scijo.integrate import quad
fn integrand[dtype: DType](x: Scalar[dtype], args: Optional[List[Scalar[dtype]]]) -> Scalar[dtype]:
return x * x
fn main() raises:
var result = quad[sj.f64, integrand](a=0.0, b=1.0, args=None, epsabs=1e-6, epsrel=1e-6)
print("∫x² from 0 to 1 =", result.integral) # Should be ~0.333
Installation
Via pixi (recommended):
Add the following to your pixi.toml
[workspace]
preview = ["pixi-build"]
[dependencies]
modular = ">=25.6.1,<26"
scijo = { git = "https://github.com/shivasankarka/SciJo.git", branch = "main"}
Full installation instructions: GitHub - shivasankarka/SciJo: A high-performance scientific computing library for Mojo, providing SciPy-like functionality with the speed and efficiency of native Mojo code.
What’s Next
I’m actively developing SciJo and have an exciting roadmap ahead:
Near term:
- More integration algorithms (QAGSE, Simpson’s, Romberg etc)
- Add GPU support (NuMojo Backend) in modules where it’s possible such as FFT.
- More FFT (
rfft,irfft) and 2D FFT support - Additional interpolation methods (cubic, spline)
- Expand differentiation module.
Future:
- Optimization (minimization, root finding)
- Statistical functions and distributions
- Signal processing (filtering, convolution)
- Linear algebra (decompositions)
Get Involved
Contributions are most welcome! Whether you want to:
- Implement new algorithms
- Optimize existing code
- Write tests or documentation
- Report bugs or suggest features
Feel free to open a PR or issue on GitHub.
Let’s build the scientific computing ecosystem for Mojo together! If you use SciJo in your work, consider citing it, it helps with visibility and supports the project’s growth ![]()
Happy computing!
Links: