Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_mean_vector
codeintel.indexer._mean_vector
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 |
|---|---|---|
| _index_batch | indexer.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| indexer | indexer.py | same file |
codeintel.indexer._mean_vectorbackend/app/codeintel/indexer.py, lines 123–132Open source
def _mean_vector(vectors: list[list[float]]) -> list[float] | None: if not vectors: return None dim = len(vectors[0]) acc = [0.0] * dim for v in vectors: for i, x in enumerate(v): acc[i] += x norm = math.sqrt(sum(x * x for x in acc)) return [x / norm for x in acc] if norm else NoneWhat the index recorded
- Signature
def _mean_vector(vectors: list[list[float]]) -> list[float] | None:- File
backend/app/codeintel/indexer.py- Lines
- 123–132
- Parser
- python-ast
- Git blob
e8fdfa7b5545e821f7649d68cfadd2aae85b89d0- Call sites
- 4 named, 0 resolved, 4 left unlinked
