Numeric Rust
N-dimensional matrix class for Rust 1.0. It links to OpenBLAS to make tensor operations fast (like matrix multipliations). It utilizes Rust's move semantics as much as possible to avoid unnecessary copies.
Features
Some of the completed and planned features:
- Element-wise addition, subtraction, multiplication, division
- Matrix multiplication and scalar product
- Indexing
- Slicing
- Generic (all operations defined for
f32
andf64
) - Integer types
- Bool type
- Strided slices
- Updating slices
- Broadcasted axes
- Matrix solver / inverse
Example
use DoubleTensor;
Output:
d =
[[ 7.00 4.00 4.00]
[ 0.00 6.00 0.00]]
e =
[ 7.00 43.00]
f =
[[ 7.00 4.00 4.00]
[ 0.00 6.00 0.00]]
g =
DoubleTensor([2, 3, 4, 5])