All Projects → numeric-rust → Numeric

numeric-rust / Numeric

Licence: mit
N-dimensional matrix class for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Numeric

Tensor
A library and extension that provides objects for scientific computing in PHP.
Stars: ✭ 146 (+186.27%)
Mutual labels:  matrix, linear-algebra, tensor
eigen
Owl's OCaml Interface to Eigen3 C++ Library
Stars: ✭ 30 (-41.18%)
Mutual labels:  matrix, linear-algebra, tensor
Armadillo Code
Armadillo: fast C++ library for linear algebra & scientific computing - http://arma.sourceforge.net
Stars: ✭ 388 (+660.78%)
Mutual labels:  matrix, linear-algebra
Matrex
A blazing fast matrix library for Elixir/Erlang with C implementation using CBLAS.
Stars: ✭ 429 (+741.18%)
Mutual labels:  matrix, linear-algebra
Lrslibrary
Low-Rank and Sparse Tools for Background Modeling and Subtraction in Videos
Stars: ✭ 625 (+1125.49%)
Mutual labels:  matrix, tensor
monolish
monolish: MONOlithic LInear equation Solvers for Highly-parallel architecture
Stars: ✭ 166 (+225.49%)
Mutual labels:  matrix, linear-algebra
Librec
LibRec: A Leading Java Library for Recommender Systems, see
Stars: ✭ 3,045 (+5870.59%)
Mutual labels:  matrix, tensor
Vectorious
Linear algebra in TypeScript.
Stars: ✭ 616 (+1107.84%)
Mutual labels:  matrix, linear-algebra
saddle
SADDLE: Scala Data Library
Stars: ✭ 23 (-54.9%)
Mutual labels:  matrix, linear-algebra
Fmatvec
A fast vector/matrix library
Stars: ✭ 5 (-90.2%)
Mutual labels:  matrix, linear-algebra
Arraymancer
A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends
Stars: ✭ 793 (+1454.9%)
Mutual labels:  tensor, linear-algebra
Mumps.jl
A Julia Interface to MUMPS
Stars: ✭ 6 (-88.24%)
Mutual labels:  matrix, linear-algebra
Matrix
Easy-to-use Scientific Computing library in/for C++ available for Linux and Windows.
Stars: ✭ 20 (-60.78%)
Mutual labels:  matrix, linear-algebra
JOLI.jl
Julia Operators LIbrary
Stars: ✭ 14 (-72.55%)
Mutual labels:  matrix, linear-algebra
Grassmann.jl
⟨Leibniz-Grassmann-Clifford⟩ differential geometric algebra / multivector simplicial complex
Stars: ✭ 289 (+466.67%)
Mutual labels:  tensor, linear-algebra
NDScala
N-dimensional arrays in Scala 3. Think NumPy ndarray, but type-safe over shapes, array/axis labels & numeric data types
Stars: ✭ 37 (-27.45%)
Mutual labels:  matrix, tensor
Libxsmm
Library for specialized dense and sparse matrix operations, and deep learning primitives.
Stars: ✭ 518 (+915.69%)
Mutual labels:  matrix, tensor
Taco
The Tensor Algebra Compiler (taco) computes sparse tensor expressions on CPUs and GPUs
Stars: ✭ 846 (+1558.82%)
Mutual labels:  tensor, linear-algebra
fml
Fused Matrix Library
Stars: ✭ 24 (-52.94%)
Mutual labels:  matrix, linear-algebra
float
Single precision (float) matrices for R.
Stars: ✭ 41 (-19.61%)
Mutual labels:  matrix, linear-algebra

Crates.io

Numeric Rust

General-purpose N-dimensional matrix class for Rust. It links to OpenBLAS and LAPACK to make tensor operations fast (such as matrix multiplications and linear solvers). It utilizes Rust's move semantics as much as possible to avoid unnecessary copies.

Documentation

Features

Some of the completed and planned features:

  • [x] Element-wise addition, subtraction, multiplication, division
  • [x] Matrix multiplication and scalar product
  • [x] Indexing
  • [x] Slicing
  • [x] Generic (anything from Tensor<bool> to Tensor<f64>)
  • [x] Mathematical functions
  • [x] Linear solver
  • [x] Basic random number generation
  • [x] Creation macro
  • [x] Updating slices
  • [x] Saving/loading HDF5
  • [x] Strided slices
  • [x] Broadcasted axes
  • [x] Basic support for complex numbers
  • [x] Singular Value Decomposition
  • [ ] Matrix inverse

Recent progress is summarized in CHANGELOG.md. For planned features, take a look at TODO.md.

Example

#[macro_use(tensor)]
extern crate numeric;

use numeric::Tensor;

fn main() {
    let a: Tensor<f64> = Tensor::range(6).reshape(&[2, 3]);
    let b = tensor![7.0, 3.0, 2.0; -3.0, 2.0, -5.0];
    let c = tensor![7.0, 3.0, 2.0];

    let d = &a + &b;         // a new tensor is returned
    println!("d = {}", d);

    let e = a.dot(&c);       // matrix multiplication (returns a new tensor)
    println!("e = {}", e);

    let f = a + &b;          // a is moved (no new memory is allocated)
    println!("f = {}", f);

    // Higher-dimensional
    let g: Tensor<f64> = Tensor::ones(&[2, 3, 4, 5]);
    println!("g = {}", g);
}

Output:

d =
 7 4 4
 0 6 0
[Tensor<f64> of shape 2x3]
e =
  7 43
[Tensor<f64> of shape 2]
f =
 7 4 4
 0 6 0
[Tensor<f64> of shape 2x3]
g =
...
[Tensor<f64> of shape 2x3x4x5]

Contribute

We love pull requests and there are tons of things to work on for this project. If you want suggestions for contributions, check out TODO.md (a non-exhaustive list of what would be useful additions). Add your name to the CONTRIBUTORS.md file as part of your PR, no matter how small it may seem.

Acknowledgements

Numeric Rust is primarily inspired by Numpy and borrows heavily from that project. Even the name is a play on Numeric Python. Another source of some inspiration is Torch7.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].