Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_pad
codeintel.embeddings._pad
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 |
|---|---|---|
| EmbeddingUnavailable | embeddings.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| _edge | embeddings.py | same file |
| _embed | embeddings.py | same file |
| encode_raw | embeddings.py | same file |
| _encode | embeddings.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| embeddings | embeddings.py | same file |
codeintel.embeddings._padbackend/app/codeintel/embeddings.py, lines 64–72Open source
def _pad(vec: Sequence[float], dim: int) -> list[float]: vec = [float(v) for v in vec] if len(vec) == dim: return vec if len(vec) > dim: raise EmbeddingUnavailable( f"model produces {len(vec)}-dim vectors; the index column holds {dim}" ) return vec + [0.0] * (dim - len(vec))What the index recorded
- Signature
def _pad(vec: Sequence[float], dim: int) -> list[float]:- File
backend/app/codeintel/embeddings.py- Lines
- 64–72
- Parser
- python-ast
- Git blob
df7f8202f23ca6ad2c57aca5f09b435eb6486d79- Call sites
- 3 named, 1 resolved, 2 left unlinked
- Outside this subset
- 1 more edges reach code outside the graph shown here
