rust-ndarray/ndarray

ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations

What it solves

It provides a way to handle n-dimensional containers for general elements and numeric data in Rust, filling the need for a powerful array manipulation library similar to those found in other scientific computing ecosystems.

How it works

The crate implements generic n-dimensional arrays that support both owned data and array views. It allows for complex slicing (including negative indices and arbitrary step sizes) and provides iterators that yield subviews. For performance, it emphasizes higher-order methods and arithmetic operations, and it can optionally integrate with BLAS (Basic Linear Algebra Subprograms) for highly efficient floating-point matrix multiplication.

Who it’s for

It is designed for developers building scientific computing, machine learning, or data analysis applications in Rust who require efficient multi-dimensional array operations.

Highlights

  • Support for generic 1, 2, ..., n-dimensional arrays
  • Ability to create owned arrays and array views
  • Advanced slicing with negative indices and custom step sizes
  • Optional BLAS integration for optimized matrix multiplication
  • Parallel iterator support via the rayon feature
  • Serialization support via serde

Related

  • Project
  • Project
  • Project
  • Project
  • Project