matten 0.20.2

A family-car multidimensional array (tensor) library for small numerical trials / PoCs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Smoke example for the M0 skeleton.
//!
//! Run: `cargo run --example hello_tensor`

use matten::Tensor;

fn main() {
    let t = Tensor::new(vec![1.0, 2.0, 3.0, 4.0], &[2, 2]);
    println!("{t:?}");
    println!(
        "shape = {:?}, len = {}, ndim = {}",
        t.shape(),
        t.len(),
        t.ndim()
    );
}