Skip to content

sinamsv/NumRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NumRS 🦀

A lightweight, high-performance linear algebra and tensor library built from scratch in Rust. NumRS provides an intuitive API, automatic parallelism for large matrices, and a clean modular design.


Key Features

  • 2D Matrix & N-D Tensor: Specialized Matrix for linear algebra and generic Tensor<T> for multi-dimensional data.
  • Intuitive Syntax: Create matrices with the ns_array! macro — just like Python/NumPy.
  • Automatic Parallelism: Silently scales across CPU cores using Rayon for large-scale computations.
  • Robust Math: Transpose, Determinant, Inverse (Gauss-Jordan), Norm, and Hadamard product.
  • Beautiful Output: Colored terminal display with automatic column alignment.
  • Reference-First Operators: Clean arithmetic (a + b, a * b) with zero unnecessary clones.

Quick Start

use numrs::{ns_array, Matrix};

fn main() {
    let a = ns_array![[1, 2], [3, 4]];
    let b = Matrix::eye(2);

    let result = &a * &b;
    println!("A x I =\n{}", result);
}

Documentation & Learning

  • Usage Guide — Detailed API documentation for all modules.
  • Examples — Practical recipes for solving linear systems, Markov chains, transformations, and more.
  • Changelog — History of releases and recent changes.

Roadmap

  • Matrix struct with colored Display
  • Full operator support (Add, Sub, Mul, Scalar)
  • Constructors (zeros, ones, eye, rand)
  • Determinant and Inverse
  • Automatic parallelism via Rayon
  • Comprehensive error handling
  • [/] Tensor Support (In Development)
  • Eigenvalues and eigenvectors
  • LU / QR decomposition
  • ML layer: ReLU, softmax, gradient tracking

License

MIT

About

a linear algebra library In rust 🦀 for AI and PQC

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages