From b490c806c1de5b1c7151f52df5c28d5936e52370 Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Mon, 23 Jun 2025 15:21:17 +0530 Subject: [PATCH] feat: Added readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4ffce89 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# ndarray-math + +Additional math operations for ndarray + +1. Cosine Similarity +```rust +use ndarray::*; +use ndarray_math::*; +fn test_orthogonal_vectors() { + let a = array![1.0, 0.0, 0.0]; + let b = array![0.0, 1.0, 0.0]; + assert_eq!(a.cosine_similarity(b).unwrap(), 0.0); +} +```