flann is the python 3.6 bindings for FLANN - Fast Library for Approximate Nearest Neighbors.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flann-1.6.13.tar.gz.
File metadata
- Download URL: flann-1.6.13.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
739f69cc3bd84dab5c2013e9ca38d16786f50ed129632071ec8adeb12dca209d
|
|
| MD5 |
2d1f0db4e22f2734ae2199d1cc642769
|
|
| BLAKE2b-256 |
67ba04b7e7d0c84a7c9931cfaee088a2c70b8327538f76eae8b8d7f81f9748db
|
File details
Details for the file flann-1.6.13-py3-none-any.whl.
File metadata
- Download URL: flann-1.6.13-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1d1268b186a74495cf20b7487bfbbe24394de156db964aa904707eff6a2629c
|
|
| MD5 |
cbf04cdc2c4b2c44525d9b753d216f2d
|
|
| BLAKE2b-256 |
7fc959155f5b615a84688b34f6ae62e598d70306082754af94ddeb3cb3475188
|