This is an automated email from the git hooks/post-receive script. a_valentino-guest pushed a commit to branch master in repository pykdtree.
commit d005a19550b44a76df6f780e6137f5d7487a746b Author: Antonio Valentino <antonio.valent...@tiscali.it> Date: Sat Aug 10 15:52:24 2013 +0000 Imported Debian patch 0.2-1 --- debian/README.rst | 96 +++++++++++++++++++++++++++++++++ debian/changelog | 5 ++ debian/compat | 1 + debian/control | 32 +++++++++++ debian/copyright | 28 ++++++++++ debian/docs | 1 + debian/patches/fix_egginfo_source.patch | 9 ++++ debian/patches/series | 1 + debian/rules | 8 +++ debian/source/format | 1 + debian/watch | 4 ++ 11 files changed, 186 insertions(+) diff --git a/debian/README.rst b/debian/README.rst new file mode 100644 index 0000000..558d6ca --- /dev/null +++ b/debian/README.rst @@ -0,0 +1,96 @@ +======== +pykdtree +======== + +Objective +--------- +pykdtree is a kd-tree implementation for fast nearest neighbour search in Python. +The aim is to be the fastest implementation around for common use cases (low dimensions and low number of neighbours) for both tree construction and queries. + +The implementation is based on scipy.spatial.cKDTree and libANN by combining the best features from both and focus on implementation efficiency. + +The interface is similar to that of scipy.spatial.cKDTree except only Euclidean distance measure is supported. + +Queries are optionally multithreaded using OpenMP. + +Installation +------------ +Default build of pykdtree with OpenMP enabled queries using libgomp + +.. code-block:: bash + + $ cd <pykdtree_dir> + $ python setup.py install + +If it fails with undefined compiler flags or you want to use another OpenMP implementation please modify setup.py at the indicated point to match your system. + +Building without OpenMP support is controlled by the USE_OMP environment variable + +.. code-block:: bash + + $ cd <pykdtree_dir> + $ export USE_OMP=0 + $ python setup.py install + +Usage +----- +The usage of pykdtree is similar to scipy.spatial.cKDTree so for now refer to its documentation + + >>> from pykdtree.kdtree import KDTree + >>> kd_tree = KDTree(data_pts) + >>> dist, idx = pkd_tree.query(query_pts, k=8) + +The number of threads to be used in OpenMP enabled queries can be controlled with the standard OpenMP environment variable OMP_NUM_THREADS. + +The **leafsize** argument (number of data points per leaf) for the tree creation can be used to control the memory overhead of the kd-tree. pykdtree uses a default **leafsize=16**. +Increasing **leafsize** will reduce the memory overhead and construction time but increase query time. + +pykdtree accepts data in double precision (numpy.float64) og single precision (numpy.float32) floating point. If data of another type is used an internal copy in double precision is made resulting in a memory overhead. If the kd-tree is constructed on single precision data the query points must be single precision as well. + +Benchmarks +---------- +Comparison with scipy.spatial.cKDTree and libANN. This benchmark is on geospatial 3D data with 10053632 data points and 4276224 query points. The results are indexed relative to the construction time of scipy.spatial.cKDTree. A leafsize of 10 (scipy.spatial.cKDTree default) is used. + +Note: libANN is *not* thread safe. In this benchmark libANN is compiled with "-O3 -funroll-loops -ffast-math -fprefetch-loop-arrays" in order to achieve optimum performance. + +================== ===================== ====== ======== ================== +Operation scipy.spatial.cKDTree libANN pykdtree pykdtree 4 threads +------------------ --------------------- ------ -------- ------------------ + +Construction 100 304 96 96 + +query 1 neighbour 1267 294 223 70 + +Total 1 neighbour 1367 598 319 166 + +query 8 neighbours 2193 625 449 143 + +Total 8 neighbours 2293 929 545 293 +================== ===================== ====== ======== ================== + +Looking at the combined construction and query this gives the following performance improvement relative to scipy.spatial.cKDTree + +========== ====== ======== ================== +Neighbours libANN pykdtree pykdtree 4 threads +---------- ------ -------- ------------------ +1 129% 329% 723% + +8 147% 320% 682% +========== ====== ======== ================== + +Note: mileage will vary with the dataset at hand and computer architecture. + +Test +---- +Run the unit tests using nosetest + +.. code-block:: bash + + $ cd <pykdtree_dir> + $ python setup.py nosetests + +Changelog +--------- +v0.2 : Reduced memory footprint. Can now handle single precision data internally avoiding copy conversion to double precision. Default leafsize changed from 10 to 16 as this reduces the memory footprint and makes it a cache line multiplum (negligible if any query performance observed in benchmarks). Reduced memory allocation for leaf nodes. Applied patch for building on OS X. + +v0.1 : Initial version. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..03222b0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +pykdtree (0.2-1) unstable; urgency=low + + * Initial release (Closes: #nnnn) + + -- Antonio Valentino <antonio.valent...@tiscali.it> Sat, 10 Aug 2013 15:52:24 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..8e7f17a --- /dev/null +++ b/debian/control @@ -0,0 +1,32 @@ +Source: pykdtree +Section: python +Priority: optional +Maintainer: Antonio Valentino <antonio.valent...@tiscali.it> +Build-Depends: debhelper (>= 9.0.0), + python-setuptools, + python-all-dev, + python-all-dbg, + python-numpy, + python-numpy-dbg +Standards-Version: 3.9.4 +Homepage: https://pypi.python.org/pypi/pykdtree +#Vcs-Git: git://git.debian.org/collab-maint/pykdtree.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/pykdtree.git;a=summary + +Package: python-pykdtree +Architecture: any +Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} +Description: Fast kd-tree implementation with OpenMP-enabled queries + pykdtree is a kd-tree implementation for fast nearest neighbour search + in Python. The aim is to be the fastest implementation around for + common use cases (low dimensions and low number of neighbours) for + both tree construction and queries. + . + The implementation is based on scipy.spatial.cKDTree and libANN by + combining the best features from both and focus on implementation + efficiency. + . + The interface is similar to that of scipy.spatial.cKDTree except only + Euclidean distance measure is supported. + . + Queries are optionally multithreaded using OpenMP. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..885af86 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,28 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: pykdtree +Source: https://pypi.python.org/pypi/pykdtree + +Files: * +Copyright: 2013 Esben S. Nielsen <e...@dmi.dk> +License: GPL-3.0+ + +Files: debian/* +Copyright: 2013 Antonio Valentino <antonio.valent...@tiscali.it> +License: GPL-3.0+ + +License: GPL-3.0+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..ff80cb7 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +debian/README.rst diff --git a/debian/patches/fix_egginfo_source.patch b/debian/patches/fix_egginfo_source.patch new file mode 100644 index 0000000..54e7012 --- /dev/null +++ b/debian/patches/fix_egginfo_source.patch @@ -0,0 +1,9 @@ +Add missing setup.cfg file in the pyresample.egg-info/SOURCES.txt +--- a/pykdtree.egg-info/SOURCES.txt ++++ b/pykdtree.egg-info/SOURCES.txt +@@ -1,5 +1,4 @@ + MANIFEST.in +-README + setup.cfg + setup.py + pykdtree/__init__.py diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..4f35079 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +fix_egginfo_source.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..dafca02 --- /dev/null +++ b/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with python2 --buildsystem=python_distutils diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..f1757af --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +# Compulsory line, this is a version 3 file +version=3 + +http://pypi.python.org/packages/source/p/pykdtree/pykdtree-(\d\S*)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pykdtree.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel