Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
distance_functions.py8 linesDownload Raw Back to utils
1from chromadb.utils.distance_functions import cosine
2import numpy as np
3
4
5def test_cosine_zero() -> None:
6    x = np.array([0.0, 0.0], dtype=np.float16)
7    assert cosine(x, x) == 1.0
8 
codekingpro/portable-devtools · Team Ai