This release is a pre-release and may not be stable for production use.
RepGeom
RepGeom is a small, dependency-free Python library for inspecting the geometry of labelled vector representations. It checks that vectors share a dimension, calculates distances and cosine similarities, and returns deterministic nearest neighbors. It is intended for small in-memory collections where results should be easy to inspect.
from math import isclose
from repgeom import EmbeddingCloud
cloud = EmbeddingCloud.from_mapping({
"cat": (1.0, 0.0),
"dog": (0.8, 0.2),
"tree": (0.0, 1.0),
})
assert cloud.nearest("cat", k=1) == (("dog", cloud.distance("cat", "dog")),)
assert all(isclose(actual, expected) for actual, expected in zip(cloud.centroid(), (0.6, 0.4)))
Results are sorted by distance, then label. Zero vectors have no cosine similarity, and nonfinite or mismatched vectors are rejected at construction. The package does not perform dimensionality reduction or model training.
Metadata
Release files for RepGeom 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| repgeom-0.1.0a1.tar.gz | 3.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| repgeom-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / repgeom-0.1.0a1.tar.gz
| Download URL | repgeom-0.1.0a1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca131c0931aabf17049bc3ae88d6d9d47e47584392472ba098300cd2a84c657c
|
|
BLAKE2b-256 checksum How to use checksums |
c9a7677c9b8fb113762540e3c299da4a95563a17069908f6deb3aceddb49300b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / repgeom-0.1.0a1-py3-none-any.whl
| Download URL | repgeom-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0426025b3815ae72304a2d3ff7fe65e8786266a6c12faf1a8ae8f105d2a19fc4
|
|
BLAKE2b-256 checksum How to use checksums |
825d8ec32f2e6d1b160078f75f4121927aa5fd9cafab839cfc66a06b0f14231f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for RepGeom 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.