Skip to main content

Anomaly cancellation

Project description

Anomalies

Python package Upload Python Package DOI

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 4<N<13 with integers until |30| with ~400 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.5.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

anomalies-0.2.5-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anomalies-0.2.5.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for anomalies-0.2.5.tar.gz
Algorithm Hash digest
SHA256 c408f7839f21f91d6ca9a769412f6a19945e2ff944e9cf91ff13d8d8e65e2e92
MD5 61dc28de187ec11c4d6f8025f4c52506
BLAKE2b-256 782365b40059cda87824c97e03a0c5e4170563f9188e54ca64e270f3f190e457

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: anomalies-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for anomalies-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4eefcc39113d641cb83e1f5225b41f6a741abe206e7bf582a7e5b7b550d610c9
MD5 ddb05e03e2a93ef8b8ffae9861d7900f
BLAKE2b-256 209e9ab2ec3cc0177a9df8166674a5ba6e95c994b9ac34d9e6a4bb338f49193e

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