pyflann
1. Introduction
pyflann is the python bindings for FLANN - Fast Library for Approximate Nearest Neighbors.
2. Install
For python2
This package uses distutils, which is the default way of installing python modules. To install in your home directory, securely run the following:
git clone https://github.com/primetang/pyflann.git cd pyflann [sudo] python setup.py install
Or directly through pip to install it:
[sudo] pip install pyflann
For python3
Please refer to this issuse to modify the code.
3. Usage
Use it just like the following code:
from pyflann import *
import numpy as np
dataset = np.array(
[[1., 1, 1, 2, 3],
[10, 10, 10, 3, 2],
[100, 100, 2, 30, 1]
])
testset = np.array(
[[1., 1, 1, 1, 1],
[90, 90, 10, 10, 1]
])
flann = FLANN()
result, dists = flann.nn(
dataset, testset, 2, algorithm="kmeans", branching=32, iterations=7, checks=16)
print result
print dists
dataset = np.random.rand(10000, 128)
testset = np.random.rand(1000, 128)
flann = FLANN()
result, dists = flann.nn(
dataset, testset, 5, algorithm="kmeans", branching=32, iterations=7, checks=16)
print result
print dists
Metadata
Release files for flann 1.6.13
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 | |
|---|---|---|---|---|
| flann-1.6.13.tar.gz | 12.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flann-1.6.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.3 kB
Release files / flann-1.6.13.tar.gz
| Download URL | flann-1.6.13.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
739f69cc3bd84dab5c2013e9ca38d16786f50ed129632071ec8adeb12dca209d
|
|
BLAKE2b-256 checksum How to use checksums |
67ba04b7e7d0c84a7c9931cfaee088a2c70b8327538f76eae8b8d7f81f9748db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.8
|
Release files / flann-1.6.13-py3-none-any.whl
| Download URL | flann-1.6.13-py3-none-any.whl |
|---|---|
| Size | 24.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1d1268b186a74495cf20b7487bfbbe24394de156db964aa904707eff6a2629c
|
|
BLAKE2b-256 checksum How to use checksums |
7fc959155f5b615a84688b34f6ae62e598d70306082754af94ddeb3cb3475188
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.8
|
Security for flann 1.6.13
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.