Skip to main content

Spherical k-nearest neighbors interpolation

Project description

SkNNI

SkNNI (pronounced "skinny") stands for spherical k-nearest neighbors interpolation and is a geospatial interpolator.

Setup

SkNNI may simply be installed from PyPI using pip.

pip install sknni

Example

Here's a short usage example.

import numpy as np

from sknni import SkNNI

if __name__ == '__main__':
    observations = np.array([[30, 120, 20],
                             [30, -120, 10],
                             [-30, -120, 20],
                             [-30, 120, 0]])
    interpolator = SkNNI(observations)
    interp_coords = np.array([[30, 0],
                              [0, -120],
                              [0, 0],
                              [0, 120],
                              [-30, 0]])
    interpolation = interpolator(interp_coords)
    print(interpolation)
    # Output:
    # [[  30.          0.          9.312546]
    #  [   0.       -120.         14.684806]
    #  [   0.          0.         12.5     ]
    #  [   0.        120.         10.315192]
    #  [ -30.          0.         16.464548]]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sknni-1.0.0.tar.gz (5.1 kB view hashes)

Uploaded source

Built Distribution

sknni-1.0.0-py2.py3-none-any.whl (5.1 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page