hello_tensor/hello_tensor.rs
1//! Smoke example for the M0 skeleton.
2//!
3//! Run: `cargo run --example hello_tensor`
4
5use matten::Tensor;
6
7fn main() {
8 let t = Tensor::new(vec![1.0, 2.0, 3.0, 4.0], &[2, 2]);
9 println!("{t:?}");
10 println!(
11 "shape = {:?}, len = {}, ndim = {}",
12 t.shape(),
13 t.len(),
14 t.ndim()
15 );
16}