Skip to content

Conversation

@Mec-iS
Copy link
Collaborator

@Mec-iS Mec-iS commented Oct 2, 2025

In case of a zero-magnitude vector is passed to cosine distance, max distance should be returned

Checklist

  • My branch is up-to-date with development branch.
  • Everything works and tested on latest stable Rust.
  • Coverage and Linting have been applied

Current behaviour

cosine distance panics for zero-magnitude vectors

New expected behaviour

cosine distance returns f64::MIN in case of zero-magnitude vectors

@Mec-iS Mec-iS merged commit e633afa into development Oct 2, 2025
11 checks passed
@Mec-iS Mec-iS deleted the patch-cosine branch October 2, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants