Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_normalize
codeintel.embeddings._normalize
PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.
PHAROS at 975a38dMIT license
Around this symbol
Search all symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| embed_documents | embeddings.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| embeddings | embeddings.py | same file |
codeintel.embeddings._normalizebackend/app/codeintel/embeddings.py, lines 57–61Open source
def _normalize(vec: list[float]) -> list[float]: norm = math.sqrt(sum(v * v for v in vec)) if norm == 0: return vec return [v / norm for v in vec]What the index recorded
- Signature
def _normalize(vec: list[float]) -> list[float]:- File
backend/app/codeintel/embeddings.py- Lines
- 57–61
- Parser
- python-ast
- Git blob
df7f8202f23ca6ad2c57aca5f09b435eb6486d79- Call sites
- 2 named, 0 resolved, 2 left unlinked
