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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file sknni-1.0.0.tar.gz.

File metadata

  • Download URL: sknni-1.0.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

File hashes

Hashes for sknni-1.0.0.tar.gz
Algorithm Hash digest
SHA256 35efe7565caa3aba26c5377243644a3838870bb3ca3212d0ccffd3d3d79fed76
MD5 178974d184b2787be261217fb7c8c023
BLAKE2b-256 c7bc409b579848a4c9af72e505fbfb5ceb4a0bcf4d6218e41a9f5db85b71764c

See more details on using hashes here.

File details

Details for the file sknni-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: sknni-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

File hashes

Hashes for sknni-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2b39103e3353d1a45586e91af352edf672b94cc3288c760af6255115652102ec
MD5 c26a986c08411505d4ab83ff14b9fbc8
BLAKE2b-256 d2dc58e34c1a38e30efc7b47c4a5d965d5a1abde725041ba8f0422a496b73b35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page