{ "info": { "author": "Reece Stevens", "author_email": "rstevens@innolitics.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering", "Topic :: Software Development" ], "description": ".. image:: https://travis-ci.org/innolitics/natural-neighbor-interpolation.svg?branch=master\n :target: https://travis-ci.org/innolitics/natural-neighbor-interpolation\n\nDiscrete Sibson (Natural Neighbor) Interpolation\n================================================\n\nNatural neighbor interpolation is a method for interpolating scattered data\n(i.e. you know the values of a function at scattered locations). It is often superior to linear barycentric interpolation, which is a commonly used method of interpolation provided by Scipy's `griddata` function.\n\nThere are several implementations of 2D natural neighbor interpolation in Python. We needed a fast 3D implementation that could run without a GPU, so we wrote an implementation of Discrete Sibson Interpolation (a version of natural neighbor interpolation that is fast but introduces slight errors as compared to \"geometric\" natural neighbor interpolation).\n\nSee https://doi.org/10.1109/TVCG.2006.27 for details.\n\nDependencies\n------------\n\n- Python 2.7 or 3.4+\n- Numpy (has been tested with 1.13+)\n\nDemonstration\n-------------\n\nNatural neighbor interpolation can be more accurate than linear barycentric interpolation (Scipy's default) for smoothly varying functions.\n\nAlso, the final result looks better.\n\n.. image:: https://raw.githubusercontent.com/innolitics/natural-neighbor-interpolation/master/demo/linear_comparison.png\n :target: https://raw.githubusercontent.com/innolitics/natural-neighbor-interpolation/master/demo/linear_comparison.png\n\n\n.. image:: https://raw.githubusercontent.com/innolitics/natural-neighbor-interpolation/master/demo/sin_sin_comparison.png\n :target: https://raw.githubusercontent.com/innolitics/natural-neighbor-interpolation/master/demo/sin_sin_comparison.png\n\nNote that the natural neighbor values usually are extrapolated; they were cut off in the demo to fairly compare with Scipy's linear barycentric method, which does not extrapolate.\n\nUsage\n-----\n\nThis module exposes a single function, :code:`griddata`.\n\nThe API for :code:`naturalneighbor.griddata` is similar to\n:code:`scipy.interpolate.griddata`. Unlike Scipy, the third argument is not a\ndense mgrid, but instead is just the ranges that would have been passed to :code:`mgrid`. This is because the discrete Sibson approach requires the interpolated points to lie on an evenly spaced grid.\n\n.. code-block:: python\n\n import scipy.interpolate\n import numpy as np\n\n import naturalneighbor\n\n num_points = 10\n num_dimensions = 3\n points = np.random.rand(num_points, num_dimensions)\n values = np.random.rand(num_points)\n\n grids = tuple(np.mgrid[0:100:1, 0:50:100j, 0:100:2])\n scipy_interpolated_values = scipy.interpolate.griddata(points, values, grids)\n\n grid_ranges = [[0, 100, 1], [0, 50, 100j], [0, 100, 2]]\n nn_interpolated_values = naturalneighbor.griddata(points, values, grid_ranges)\n\nFuture Work\n-----------\n\n- Provide options for extrapolation handling\n- Support floats and complex numbers (only support doubles at the moment)\n- Support 2D (only support 3D)\n- Add documentation with discussion on limitations of discrete sibson's method\n- Uncomment cpplint from tox.ini and cleanup C++ code\n- Generalize the threading model (currently it uses 8 threads---one for each quadrant)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/innolitics/natural-neighbor-interpolation", "keywords": "interpolation scipy griddata numpy sibson", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "naturalneighbor", "package_url": "https://pypi.org/project/naturalneighbor/", "platform": "", "project_url": "https://pypi.org/project/naturalneighbor/", "project_urls": { "Homepage": "https://github.com/innolitics/natural-neighbor-interpolation" }, "release_url": "https://pypi.org/project/naturalneighbor/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Fast, discrete natural neighbor interpolation in 3D on a CPU.", "version": "0.2.1" }, "last_serial": 4146505, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f26386e96280753a25c5f869419da6b5", "sha256": "302094da906d683f3be2137d1cd79ee31eedfa09f66a81c08411da5b6dbabdd6" }, "downloads": -1, "filename": "naturalneighbor-0.1.tar.gz", "has_sig": false, "md5_digest": "f26386e96280753a25c5f869419da6b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7505, "upload_time": "2017-08-13T23:34:58", "url": "https://files.pythonhosted.org/packages/e6/fd/279e8c015bf3ba1e23c196dfe89c23193675a65d8e81076e32e9c5ddb10e/naturalneighbor-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d40c34e7b9ae545ce954d6b7fd762ca8", "sha256": "81df9aea0d753cd4f0b9d8fca9ea4a1ecab2b7344bcc16fd21aace008f8f66c5" }, "downloads": -1, "filename": "naturalneighbor-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d40c34e7b9ae545ce954d6b7fd762ca8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7520, "upload_time": "2017-08-14T00:20:30", "url": "https://files.pythonhosted.org/packages/8b/77/0cb30d190e54992783ce4e02417dbb069ce7c412c28c10cbba4920070197/naturalneighbor-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7c23eaa634661731197a38e7404048cb", "sha256": "7f1797b1f4f059a4712eae51aee69614de5a72ced3fc2c1b6ce204ad059acfcd" }, "downloads": -1, "filename": "naturalneighbor-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7c23eaa634661731197a38e7404048cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7224, "upload_time": "2017-08-21T13:45:37", "url": "https://files.pythonhosted.org/packages/84/7b/450f57452047e771b9334381c30c8cea2b69e0cac030f46d50208488cc16/naturalneighbor-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "41cff8fd40b56ce3479c34f71d6fb27c", "sha256": "579e54c8af0da75217c58bdb07f0015832d6ad150397223f44a9d509aff65b76" }, "downloads": -1, "filename": "naturalneighbor-0.1.3.tar.gz", "has_sig": false, "md5_digest": "41cff8fd40b56ce3479c34f71d6fb27c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7490, "upload_time": "2017-08-24T02:47:36", "url": "https://files.pythonhosted.org/packages/e2/19/72700b180df2ad84624f82556dcaabdff35e41af1eb1fe676f36cd433906/naturalneighbor-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2ae06e459fc2a4efe2c564a61aa7f2b2", "sha256": "2b240152f7dd85dec20b503b9e68f6590b5133529f3c0a909f12b9d172529b3c" }, "downloads": -1, "filename": "naturalneighbor-0.1.4.tar.gz", "has_sig": false, "md5_digest": "2ae06e459fc2a4efe2c564a61aa7f2b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8213, "upload_time": "2017-08-25T04:55:57", "url": "https://files.pythonhosted.org/packages/29/e4/0354608bcf5ad1b61fa29fb651f08bee927127b5015254a89dbb8c109226/naturalneighbor-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "cc4564984d9aaaf6e362882908450b7e", "sha256": "425d1d57a8575ea0cd6d8ac18b2528509608c260382f064ca70f22ce04f61f79" }, "downloads": -1, "filename": "naturalneighbor-0.1.5.tar.gz", "has_sig": false, "md5_digest": "cc4564984d9aaaf6e362882908450b7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9012, "upload_time": "2017-08-26T03:40:36", "url": "https://files.pythonhosted.org/packages/66/9b/7832315b038b20d94c6d7fd14a6baafaa61daf61de38756fb18257c9bb93/naturalneighbor-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "de92499275caf6184f88636fd3b04e18", "sha256": "0ef85df9449d437203652bb07d159c0ddf55c8e1d4b7c91c2238f03d11c08f2f" }, "downloads": -1, "filename": "naturalneighbor-0.1.6.tar.gz", "has_sig": false, "md5_digest": "de92499275caf6184f88636fd3b04e18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9039, "upload_time": "2017-09-07T06:17:30", "url": "https://files.pythonhosted.org/packages/3d/67/659e51bff25ef0f3906d773a85be49ad5dbdd395189126b8ef096a7b75bc/naturalneighbor-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "687b074b3ba3ec761a87aa4235020fdc", "sha256": "49067fec5e942e60a49daeeb1795f2889de45c48d8178cbbcb1886e5045805cd" }, "downloads": -1, "filename": "naturalneighbor-0.1.7.tar.gz", "has_sig": false, "md5_digest": "687b074b3ba3ec761a87aa4235020fdc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9108, "upload_time": "2017-09-14T01:47:19", "url": "https://files.pythonhosted.org/packages/cb/af/387eaad01033c82d29674a48edbc8a9deb3c885aa0d02e817d469f31f091/naturalneighbor-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "f8abf1fc0202bc41699b87b7bc30c0fb", "sha256": "d8227f88d1a4e222e743a291a799cb11a32bea5a55828524e75963c6fce32b67" }, "downloads": -1, "filename": "naturalneighbor-0.1.8.tar.gz", "has_sig": false, "md5_digest": "f8abf1fc0202bc41699b87b7bc30c0fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8853, "upload_time": "2017-09-17T03:39:08", "url": "https://files.pythonhosted.org/packages/9a/bb/4b91f814a408c7d28f70f33e9f2207e8f2033cd33e01d8be94572f815004/naturalneighbor-0.1.8.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "494e3f4ccddbabcdf0f6e4b487b23c09", "sha256": "c7f9d69defe0ed53956be9f8d3e4b4d6b4eed830998536c30247b905096a9b70" }, "downloads": -1, "filename": "naturalneighbor-0.2.0.tar.gz", "has_sig": false, "md5_digest": "494e3f4ccddbabcdf0f6e4b487b23c09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10213, "upload_time": "2018-07-27T20:59:59", "url": "https://files.pythonhosted.org/packages/2f/a1/49de51161dd0d0818007e530abeba7fd58b66050ac97d29420a57252a8cd/naturalneighbor-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "663ee9f77d2e2d0ab75f47ea1e1e411e", "sha256": "647b5922c3787887c04be7748f8112a1720b1323c8e86b4c6665ce7eee89aee7" }, "downloads": -1, "filename": "naturalneighbor-0.2.1.tar.gz", "has_sig": false, "md5_digest": "663ee9f77d2e2d0ab75f47ea1e1e411e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10475, "upload_time": "2018-08-07T22:57:19", "url": "https://files.pythonhosted.org/packages/5a/88/98d3ee9631c333662366c405d23d49c0feaf51a8bfd4ae222534befd0759/naturalneighbor-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "663ee9f77d2e2d0ab75f47ea1e1e411e", "sha256": "647b5922c3787887c04be7748f8112a1720b1323c8e86b4c6665ce7eee89aee7" }, "downloads": -1, "filename": "naturalneighbor-0.2.1.tar.gz", "has_sig": false, "md5_digest": "663ee9f77d2e2d0ab75f47ea1e1e411e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10475, "upload_time": "2018-08-07T22:57:19", "url": "https://files.pythonhosted.org/packages/5a/88/98d3ee9631c333662366c405d23d49c0feaf51a8bfd4ae222534befd0759/naturalneighbor-0.2.1.tar.gz" } ] }