Menu

I’m Building NumPy in Rust: Introducing rustnum
📰

I’m Building NumPy in Rust: Introducing rustnum

DEV Community: rust·Shaurya Ojha·about 15 hours ago
#bwwoixvq
#devtorust#devto#dev#rust#array
Reading 0:00
15s threshold

I’ve been working on rustnum , a pure-Rust, NumPy-style n-dimensional array library for Rust.

The goal is to make scientific computing and machine-learning-related numerical code more approachable for Rust developers while keeping the implementation portable and free from system BLAS or Fortran dependencies.

Why build another numerical array library?

Rust already has excellent numerical libraries, including ndarray . However, while working on ML infrastructure, I wanted to explore a different API and implementation strategy:

One dynamic-dimensional Array<T> type

NumPy-inspired function names

Familiar broadcasting and slicing

Pure-Rust numerical kernels

Optional parallelism through Rayon

Runtime SIMD acceleration where available

This project is also part of a larger experiment: rebuilding parts of the Python ML stack in Rust, one library at a time.

A NumPy-style Rust API

use rustnum as np ;

fn main () { let a = np :: arange ( 0.0 , 6.0 , 1.0 ) .reshape ( & [ 2 , 3 ]);

let b = np :: array!…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.