NuMojo¶
A library for numerical computing in Mojo 🔥 — fast, vectorized, and GPU-ready. Inspired by NumPy and SciPy.
What is NuMojo?¶
NuMojo provides fast, vectorized numerical routines for Mojo — the same role NumPy and SciPy play in the Python ecosystem, but built from the ground up to exploit Mojo's native SIMD, parallelism, and (future) GPU acceleration.
NuMojo is not a machine learning library and will never include back-propagation.
Core types¶
| Type | Description |
|---|---|
NDArray |
General-purpose N-dimensional array for tensors, grids, batches |
Matrix |
Dedicated 2-D array optimized for linear-algebra workflows |
ComplexNDArray |
N-dimensional array of complex numbers |
Highlights¶
Routines at a glance¶
- Creation —
zeros,ones,arange,linspace,fromstring,random, … - Manipulation —
reshape,transpose,flip,broadcast_to, … - Math —
sin,cos,exp,log,sqrt, arithmetic, rounding, … - Linear algebra —
matmul,inv,solve,lstsq,det,norm, decompositions, … - Logic —
all,any, comparison, logical ops, … - Statistics —
mean,std,var,sum,prod,min,max, … - Sorting & searching —
sort,argsort,argmin,argmax, … - I/O — file read/write, formatting, …
- Science — interpolation, signal processing, …
Installation¶
The fastest way to get started:
[workspace]
channels = ["https://repo.prefix.dev/modular-community"]
[dependencies]
numojo = "=0.8.0"
See the full installation guide for all methods.
Version compatibility¶
| NuMojo | Mojo |
|---|---|
| v0.8.0 | ==25.7 |
| v0.7.0 | ==25.3 |
| v0.6.1 | ==25.2 |
License¶
Apache 2.0 with LLVM Exceptions. See LICENSE.