Anomaly cancellation
Project description
Anomalies
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
Release history Release notifications | RSS feed
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.1.8.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file anomalies-0.1.8.tar.gz
.
File metadata
- Download URL: anomalies-0.1.8.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecbc566ae1ff2d5c4e20c2d1c5d28889347bec17b70fef2131d699251e6c3994 |
|
MD5 | cea2a42e3ed71bca2a7358c4098871ec |
|
BLAKE2b-256 | 0a60720a70085472070e2a3b278c7fb6234637fcc568e8291dc3e41035f7fd71 |
Provenance
File details
Details for the file anomalies-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: anomalies-0.1.8-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7452892fae956a4bfb93a091d888b7e841c04dc31dc4f4f1283f800ae269c051 |
|
MD5 | 7c0969fe98dc01abef66fe3d2a5ca7d6 |
|
BLAKE2b-256 | b01a47b89121dbfdf86228a2f5f52ea6885a5bf40e99fcc81058c6e38b41778a |