Skip to main content

Turning Function

This module contains Python bindings to a C-implementation of "An efficiently computable metric for comparing polygonal shapes" (Arkin et al., 1991).

Installation

pip install turning_function

Usage

Call turning_function.distance(shape_a, shape_b, brute_force_updates=False) where shape_a/shape_b are Nx2-shaped lists of points (not numpy arrays). This function will return four values: distance, theta, ht_err, slope_err. The error terms will be zero if brute_force_updates is False. Note that there is a maximum number of points (turning_function.max_points) a shape can hold.

import turning_function
import random

def random_shape(num_points: int):

	return [(random.random(), random.random()) for _ in range(num_points)]

shape_a = random_shape(turning_function.max_points)
shape_b = random_shape(42)

distance, theta, ht_err, slope_err = turning_function.distance(shape_a, shape_b, brute_force_updates=False)
print('Distance: ', distance)

License

The original source has this disclaimer:

Implementation (c) Eugene K. Ressler 91, 92 This source may be freely distributed and used for non-commercial purposes, so long as this comment is attached to any code copied or derived from it.

Metadata

Release files for turning-function 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for turning-function 0.0.3
File
turning_function-0.0.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
turning_function-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
turning_function-0.0.3-cp310-cp310-macosx_10_15_universal2.whl CPython 3.10 CPython 3.10 macOS 10.15+ universal2 (ARM64, x86-64) Details
turning_function-0.0.3-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
turning_function-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
turning_function-0.0.3-cp39-cp39-macosx_10_15_universal2.whl CPython 3.9 CPython 3.9 macOS 10.15+ universal2 (ARM64, x86-64) Details
turning_function-0.0.3-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
turning_function-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
turning_function-0.0.3-cp38-cp38-macosx_10_15_universal2.whl CPython 3.8 CPython 3.8 macOS 10.15+ universal2 (ARM64, x86-64) Details
turning_function-0.0.3-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
turning_function-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details
turning_function-0.0.3-cp37-cp37m-macosx_10_15_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64 Details

Total release size: 1.0 MB

Release files / turning_function-0.0.3-cp310-cp310-win_amd64.whl

Download URL turning_function-0.0.3-cp310-cp310-win_amd64.whl
Size 58.7 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e1944f92927fbd5f83b78421bc4838bca8928204ebd51c2a6f159e257c809ea6
BLAKE2b-256 checksum
How to use checksums
f993251787b64604da3af0b67e025889992fd0bcbb115b2dbfad97d4e5584de5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turning_function-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 91.6 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
5e6a4b0bc3974ca8db26a067952c91e4a942b19fc0df7ea873af210c10e68115
BLAKE2b-256 checksum
How to use checksums
b6125225fd2096486a2f2dc86a3b86ca4a1a850ca98c0542ffd1e1b6e76009f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp310-cp310-macosx_10_15_universal2.whl

Download URL turning_function-0.0.3-cp310-cp310-macosx_10_15_universal2.whl
Size 113.2 kB
Tags CPython 3.10 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
ad71081de8c0288eb63476dafdb5db6eff8230fdb4d51f264bc4e8f26b767809
BLAKE2b-256 checksum
How to use checksums
f384d0654625dfd7caa996f03da0592ae7658709e900fe0fcc3fc0b5e06de95e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp39-cp39-win_amd64.whl

Download URL turning_function-0.0.3-cp39-cp39-win_amd64.whl
Size 58.8 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
507145a6f2ea016fb0382f69914bbd7937a37623aee94cf5e08ea6448f8276f2
BLAKE2b-256 checksum
How to use checksums
d5ff51f9cefe1b040b516692b137c9c3b718b134c5b6179b2db8ea5d2250233a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turning_function-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 91.7 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fea1175b16ef3d73465a329c0f408187a8d335ad42d7e50b10fe79a71a6c9d09
BLAKE2b-256 checksum
How to use checksums
904fa565328fa889c00f7a67395e511bd0e7eec2fb8952653c3b304752849bc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp39-cp39-macosx_10_15_universal2.whl

Download URL turning_function-0.0.3-cp39-cp39-macosx_10_15_universal2.whl
Size 113.5 kB
Tags CPython 3.9 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
aa11d3b75d3e88b13f0db3c56db66d1d6d46d7c67ef990dafb84eeede84a2ed2
BLAKE2b-256 checksum
How to use checksums
c4183aeb1fc7c63f8a17c88cc7134319cd722fb328b54630597aec7ffa4e3ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp38-cp38-win_amd64.whl

Download URL turning_function-0.0.3-cp38-cp38-win_amd64.whl
Size 58.7 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
c6c5f85c94fed6eaba87fcf5d4b18f86c3f07ee255ea5e1142a78865e4ee1143
BLAKE2b-256 checksum
How to use checksums
a70d83cf13d50be8cade167877dbadb49635585eda2b0bb6320e62540a6c25be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turning_function-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 91.5 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
436ca8048743d4b478c49b68c780eeca4d8d9e7cd32025fee2697dfddf542b26
BLAKE2b-256 checksum
How to use checksums
9c6cb655040c0e02d6dfade1a2f7aecd62328fe94a11667ec160fbacf269155c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp38-cp38-macosx_10_15_universal2.whl

Download URL turning_function-0.0.3-cp38-cp38-macosx_10_15_universal2.whl
Size 113.1 kB
Tags CPython 3.8 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
862dab9e6c019971f8f42627e869a190e2447970f19123fc02ca1052306ca300
BLAKE2b-256 checksum
How to use checksums
91c8a2c6c89cf3d2eecade584b1601adc5f6333ce4d74d01ecbfaf41a2442cbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp37-cp37m-win_amd64.whl

Download URL turning_function-0.0.3-cp37-cp37m-win_amd64.whl
Size 59.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
54d3cd6d428a2d9359504a120b638f2cd27d6eae8022c3b126e577ab73ec7ed9
BLAKE2b-256 checksum
How to use checksums
9396d0debca80cabdf8417f5ced25d5329f6122c81122ba250a110b995001683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turning_function-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 92.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
233087b2f4b9d5b896c468db09f1bc575f16d6f84b14b8f70566e6e2f9b80c97
BLAKE2b-256 checksum
How to use checksums
6b0ebb3aaee676696f215aed939688f320b148d1316fd129d6d4eae1e9b8f3b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / turning_function-0.0.3-cp37-cp37m-macosx_10_15_x86_64.whl

Download URL turning_function-0.0.3-cp37-cp37m-macosx_10_15_x86_64.whl
Size 58.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
9d0436b10811c663253281353cc22b771b7e49e8cdb15487fe496dad8cb67014
BLAKE2b-256 checksum
How to use checksums
7895c2e00e56fbbc8ae8bad8ca1a6d6846a2f6b70233b60f6f90cb57a5d6f554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for turning-function 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.3 This release

12 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page