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 5<N<12 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.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: anomalies-0.2.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for anomalies-0.2.4.tar.gz
Algorithm Hash digest
SHA256 867eadc53fba7f7fb5da686260edc7351bfb86f91124c67bc9adfd36cad057b9
MD5 ce9614dd6200181306093c7c64e7d1de
BLAKE2b-256 d8e240fd5f3fb815f0f1912a79cc5710056a0d07782d9abfc71ac324216e1241

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: anomalies-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for anomalies-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ad1245f46f77305624e9ca490dabf5402c871c727126b90b7f56ee9cba99af56
MD5 128a09de39a3d4413d2fa543c03c953f
BLAKE2b-256 9c6a8daafcf1d2cae961d7fadbff6807ced02e127e6bc7b2bdf818240ace990a

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