Expand description
§Description
NDim is an open-source Rust library for n-dimensional array storage, similar to NumPy in Python and ndarray in Rust. It aims to assist in scientific computation by providing efficient and flexible n-dimensional array data structures and operations. The library is designed to be performant and easy to use, making it an excellent choice for high-performance computing tasks in Rust.
Note: This project is still under development, and contributions are welcome!
§Features
- N-Dimensional Array Storage: Efficient storage and manipulation of n-dimensional arrays.
- Generic Data Types: Supports various numeric types, including integers and floating-point numbers. Basic Array Operations: Provides basic operations such as array creation, indexing, and element-wise operations.
§Upcoming Features
- Fancy printing: Print the n-dimensional array conforming to its shape.
- Axes mutation: Change values of the n-dimensional array in an axis and much more with axes.
- Mapping and other looping support: Loop over the n-dimensional array by using (viz.) map, reduce, filter, etc. methods.
- BLAS Support: Integration with Basic Linear Algebra Subprograms (BLAS) for advanced linear algebra operations.
§Installation
Add the following to your Cargo.toml
:
[dependencies]
ndim = { git = "https://github.com/noobsiecoder/ndim.git" }
§Usage
Here’s a simple example of how to use NDim
:
use ndim::core::NdArray;
fn main() {
// Create an NdArray filled with a specific value
let shape = [3, 2];
let array = NdArray::<i32, 2>::zeros(shape);
// Print the array
for i in 0..array.shape()[0] {
for j in 0..array.shape()[1] {
println!("{}", array[[i, j]]); // access the value from memory
}
}
}
Modules§
- core
- Contains core API to create N-dimensional array and also helps in manipulating the values in its corresponding memory address.