
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A package implementing a vantage-point data structure, for efficient nearest neighbor searching.
.. image:: https://badge.fury.io/py/vptree.svg :target: https://badge.fury.io/py/vptree
.. image:: https://app.travis-ci.com/RickardSjogren/vptree.svg?branch=master :target: https://app.travis-ci.com/RickardSjogren/vptree
This package contains an implementation of a vantage-point tree <https://en.wikipedia.org/wiki/Vantage-point_tree>
_ data structure.
Simply install through pip:
.. code-block::
pip install vptree
Example usage:
.. code-block:: python
import numpy as np import vptree
def euclidean(p1, p2): return np.sqrt(np.sum(np.power(p2 - p1, 2)))
points = np.random.randn(20000, 10) query = [.5] * 10
tree = vptree.VPTree(points, euclidean)
tree.get_nearest_neighbor(query)
tree.get_n_nearest_neighbors(query, 10)
tree.get_all_in_range(query, 3.14)
FAQs
A package implementing a vantage-point data structure, for efficient nearest neighbor searching.
We found that vptree demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.