Skip to main content

Anomaly cancellation

Project description

Anomalies

Python package Upload Python Package

Implement the anomaly free solution of arXiv:1905.13729 [PRL]:

Obtain a numpy array z of N integers which satisfy the Diophantine equations

>>> z.sum()
0
>>> (z**3).sum()
0

The input is two lists l and k with any (N-3)/2 and (N-1)/2 integers for N odd, or N/2-1 and N/2-1 for N even (N>4). The function is implemented below under the name: free(l,k)

Install

$ pip install anomalies

USAGE

>>> from anomalies import anomaly
>>> anomaly.free([-1,1],[4,-2])
array([  3,   3,   3, -12, -12,  15])
>>> anomaly.free.gcd
3
>>> anomaly.free.simplified
array([ 1,  1,  1, -4, -4,  5])

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

anomalies-0.2.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

anomalies-0.2.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file anomalies-0.2.0.tar.gz.

File metadata

  • Download URL: anomalies-0.2.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.9.1

File hashes

Hashes for anomalies-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6ede64881e9762d070a176765383e91d5d24c8c8e213bf912324a400dac087ce
MD5 a6a3e44b837c8988b81b30c5bbbe255b
BLAKE2b-256 622f7be1583c50cc287aa28179ac5390256468396a4894be51725bc4077b9889

See more details on using hashes here.

File details

Details for the file anomalies-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: anomalies-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.9.1

File hashes

Hashes for anomalies-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af04f3dbb2aee1887c648b33465160c9a02857eb1735f3ea008719cd52e3a084
MD5 ec555ef886e473b31f26688a8a3a33dd
BLAKE2b-256 609cd577487a6705de0d35ccdf1e7da81b2a1c58f58e5c25c17320dcccfbb700

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