Skip to main content

Crate numina

Crate numina 

Source
Expand description

§Numina - Backend-Agnostic Array Library for Rust

Numina provides a safe, efficient array library with an ndarray-compatible API, designed as the foundation for high-performance computing backends in Rust.

§Backends

Numina exposes operations over the NdArray trait. This lets the same ops run on:

  • typed CPU arrays (Array<T>)
  • byte-addressable CPU arrays (CpuBytesArray)
  • future backends (GPU, remote) that implement NdArray

§Safety model

Numina uses internal unsafe casting when operating over raw bytes. Implementing dtype::DTypeLike for a custom type is therefore an unsafe contract: your type’s in-memory layout must match the dtype you claim.

Re-exports§

pub use array::Array;
pub use array::CpuBytesArray;
pub use array::NdArray;
pub use array::Shape;
pub use array::Strides;
pub use dtype::DType;
pub use dtype::DTypeCandidate;
pub use dtype::DTypeElement;
pub use dtype::DTypeId;
pub use dtype::DTypeInfo;
pub use dtype::DTypeLike;
pub use dtype::types::BFloat8;
pub use dtype::types::BFloat16;
pub use dtype::types::Complex32;
pub use dtype::types::Complex64;
pub use dtype::types::Complex128;
pub use dtype::types::Float8E4M3Fn;
pub use dtype::types::Float8E5M2;
pub use dtype::types::Float16;
pub use dtype::types::Float32;
pub use dtype::types::QuantizedI4;
pub use dtype::types::QuantizedU8;
pub use ops::abs;
pub use ops::acos;
pub use ops::add;
pub use ops::add_scalar;
pub use ops::asin;
pub use ops::atan;
pub use ops::cos;
pub use ops::exp;
pub use ops::log;
pub use ops::matmul;
pub use ops::mul;
pub use ops::pow;
pub use ops::sign;
pub use ops::sin;
pub use ops::sqrt;
pub use ops::tan;
pub use reductions::max;
pub use reductions::mean;
pub use reductions::min;
pub use reductions::prod;
pub use reductions::sum;
pub use sorting::argsort;
pub use sorting::sort;
pub use sorting::where_condition;
pub use DType::*;

Modules§

array
Array abstractions and CPU-backed implementations.
dtype
Data type definitions and implementations for arrays.
ops
Element-wise and pointwise array operations built on the NdArray abstraction.
reductions
Reduction operations (sum, mean, max, min, prod, …).
sorting
Sorting and searching operations.