(unofficial) `nanoflann` bindings for python and fortran.
Project description
napf
nanoflann
wrappers for python and maybe fortran.
python
As nanoflann
offers template classes, separate classes are implemented in napf
for each {datatype, data dimension, distance metric}. All the search functions are equipped with multi-thread execution. Uses numpy.ndarray
for data input and output.
Currently, the combinations of following options are supported:
data type
: {double, float, int, long} (corresponds to {np.float64, np.float32, np.int32, np.int64})data dimension
: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}distance metric
: {L1, L2}
quick start
import napf
import numpy as np
data = <data in 2D array>
queries = <query points in 2D array>
kdt = napf.KDT(tree_data=data, metric=1)
indices, distances = kdt.knn_search(
queries=queries,
kneighbors=3,
nthread=4,
)
...
fortran
maybe...
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
napf-0.0.0.tar.gz
(25.9 kB
view hashes)
Built Distributions
Close
Hashes for napf-0.0.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d97e004a43ac44a1d01d6e88c05dc0fa2313ea3c449e6e5517d215814aac5a6 |
|
MD5 | 97dcf9a57487dfd431d2fbd82a651070 |
|
BLAKE2b-256 | 13df079cff367a974cd399c10b2d6abcc48af8586abc3a75f2b60bf737f987d7 |
Close
Hashes for napf-0.0.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22ea0b29c7bb40df970c22efc3215c392c1c8f50555aca9cdee658caadfcfc61 |
|
MD5 | 10e859e54d8f85644c4ebaef6a8eebc5 |
|
BLAKE2b-256 | 1bbddbb9b65f06005b42107b51b34fa3d9e92d15d3c88d473260694639461a4d |
Close
Hashes for napf-0.0.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96325c2948625650b4aa3b5ee5514e1bf3ae9caac66b77603b974203e87a5056 |
|
MD5 | d746f09cea1643e6c9f90a397882b3ee |
|
BLAKE2b-256 | 429bda29e9d789d4a8de2936f25dbc26d9c229ef7b3fc33be372b4832599064c |
Close
Hashes for napf-0.0.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c269fd894cd7337866cbc7035f64e28473c7226a1e89403ecfb66ac3590d2af6 |
|
MD5 | 5eab32fa089130f92f320b14014cc765 |
|
BLAKE2b-256 | d232b79c1b45b7f391cb9a3a096fd67df4c6b561985c0d2ab991d2bd9cba029a |