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

Example

A sample for 5<N<10 with integers until |30| with ~30 000 chiral solutions can be download from here [JSON]

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.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

anomalies-0.2.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anomalies-0.2.1.tar.gz
  • Upload date:
  • Size: 3.1 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.2 CPython/3.9.1

File hashes

Hashes for anomalies-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e124f9c9591251d4ac48c2c380fac58aa408cb9811f3983bd3745bd51a14b684
MD5 11664cf677281f74621e120833457d99
BLAKE2b-256 b413174edd6fe1105a30ef301cd018037568c0a3fa4d8d15886bff0039d76ad9

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: anomalies-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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.2 CPython/3.9.1

File hashes

Hashes for anomalies-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 32379ec48703bdbba5efb625a5b40c3cfce9642001fb6dcc6bc3d99f7232511e
MD5 41d70064b60bab94c8c776a44bf7d29c
BLAKE2b-256 aba4da515f205a8a39d8942f027c9aa71efec5055238308a09048066479b72c7

See more details on using hashes here.

Provenance

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