feat: Added readme
This commit is contained in:
14
README.md
Normal file
14
README.md
Normal file
@@ -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);
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user