From 46a466eca846ab8e2855d6b95822e84681d32057 Mon Sep 17 00:00:00 2001 From: Julius Koskela Date: Wed, 3 Jan 2024 17:12:41 +0200 Subject: [PATCH] Update README Signed-off-by: Julius Koskela --- README.md | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index afbb613..25a8e76 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,3 @@ -# Mainfold +# Manifold -```rust -// Create two tensors with different ranks and shapes -let mut tensor1 = Tensor::::from([2, 2]); // 2x2 tensor -let mut tensor2 = Tensor::::from([2]); // 2-element vector - -// Fill tensors with some values -tensor1.buffer_mut().copy_from_slice(&[1, 2, 3, 4]); -tensor2.buffer_mut().copy_from_slice(&[5, 6]); - -// Calculate tensor product -let product = tensor1.tensor_product(&tensor2); - -println!("T1 * T2 = {}", product); - -// Check shape of the resulting tensor -assert_eq!(product.shape(), Shape::new([2, 2, 2])); - -// Check buffer of the resulting tensor -assert_eq!(product.buffer(), &[5, 6, 10, 12, 15, 18, 20, 24]); -``` +A tensor implementation in Rust.