VP-Tree
This package contains an implementation of a vantage-point tree data structure.
Installation
Simply install through pip:
pip install vptree
Example
Example usage:
import numpy as np
import vptree
# Define distance function.
def euclidean(p1, p2):
return np.sqrt(np.sum(np.power(p2 - p1, 2)))
# Generate some random points.
points = np.random.randn(20000, 10)
query = [.5] * 10
# Build tree in O(n log n) time complexity.
tree = vptree.VPTree(points, euclidean)
# Query single point.
tree.get_nearest_neighbor(query)
# Query n-points.
tree.get_n_nearest_neighbors(query, 10)
# Get all points within certain distance.
tree.get_all_in_range(query, 3.14)
Metadata
Release files for vptree 1.3
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 | Actions |
|---|---|---|---|---|
| vptree-1.3.tar.gz | 4.4 kB | Without provenance | Details for vptree-1.3.tar.gz |
Release files / vptree-1.3.tar.gz
| Download URL | vptree-1.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a412a833a6ab18936b96c5e21177a462fb438b26d285e258cb836df8fd01a97d
|
|
BLAKE2b-256 checksum How to use checksums |
38f5535b223cc11368d7b30059a72fc4a23797d509a6d491df6f3f3d99652bea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.10
|
Security for vptree 1.3
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.