Skip to main content

inpoly-cython / Original: https://github.com/dengwirda/inpoly-python

Project description

inpoly-cython / Original: https://github.com/dengwirda/inpoly-python

$pip install inpoly-cython



Project from: https://github.com/dengwirda/inpoly-python

I only added the automatic compilation of the fast kernels: https://github.com/dengwirda/inpoly-python#fast-kernels





License Terms (from https://github.com/dengwirda/inpoly-python)

This program may be freely redistributed under the condition that the copyright notices (including this entire header) are not removed, and no compensation is received through use of the software. Private, research, and institutional use is free. You may distribute modified versions of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution of this code as part of a commercial system is permissible ONLY BY DIRECT ARRANGEMENT WITH THE AUTHOR. (If you are not directly supplying this code to a customer, and you are instead telling them how they can obtain it for free, then you are not required to make any arrangement with me.)



DISCLAIMER: Neither I nor the University of Sydney warrant this code in any way whatsoever. This code is provided "as-is" to be used at your own risk.



Example: 



from inpoly_cython import inpoly2

import numpy as np

    

xmin, xmax, ymin, ymax = 0, 1, 0, 1

x0, y0, x1, y1 = 0.5, 0.5, 0, 1



#define any n-sided polygon

p = np.array([[xmin, ymin],

              [xmax, ymin],

              [xmax, ymax],

              [xmin, ymax],

              [xmin, ymin]])



#define some coords

coords = np.array([[x0, y0],

                   [x1, y1]])



#get boolean mask for points if in or on polygon perimeter

isin, ison = inpoly2(coords, p)

Project details


Release history Release notifications | RSS feed

This version

0.10

Download files

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

Source Distribution

inpoly_cython-0.10.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

inpoly_cython-0.10-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file inpoly_cython-0.10.tar.gz.

File metadata

  • Download URL: inpoly_cython-0.10.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for inpoly_cython-0.10.tar.gz
Algorithm Hash digest
SHA256 ff145cdc3348242f03929effc02a3e711f18b80a234b93f5c529caf55b5f6dbc
MD5 4d920ebc5f8ef305ac32f81f46db2c2b
BLAKE2b-256 bc80fdbcacbb712a184389ffea8a990a51e77ce814fe63967dd93f3623ed28c0

See more details on using hashes here.

File details

Details for the file inpoly_cython-0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for inpoly_cython-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 06e3af7e28f42a0066028e7eac0cb39488638a602b884476d9ebe5dacdfa2a58
MD5 9a7553236335c35a73e5565be5e782bd
BLAKE2b-256 ef5735f60cc2bf2ec9fe8c168b393f46767816b613b528e4c335f766fa53b323

See more details on using hashes here.

Supported by

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