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.2.0.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for anomalies-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af04f3dbb2aee1887c648b33465160c9a02857eb1735f3ea008719cd52e3a084 |
|
MD5 | ec555ef886e473b31f26688a8a3a33dd |
|
BLAKE2b-256 | 609cd577487a6705de0d35ccdf1e7da81b2a1c58f58e5c25c17320dcccfbb700 |