Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbern committed Apr 11, 2023
1 parent e642be3 commit 025536f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ann_benchmarks/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def euclidean(a, b):
"distance_valid": lambda a: True,
},
"angular": {
"distance": lambda a, b: 1 - np.dot(a / norm(a), b / norm(b)),
"distance": lambda a, b: 1 - np.dot(a, b) / (norm(a) * norm(b)),
"distance_valid": lambda a: True,
},
}
Expand Down

0 comments on commit 025536f

Please sign in to comment.