Created
March 28, 2019 03:42
-
-
Save lan496/ec5b7cda5cdfb4a87331612d7633fa16 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from itertools import product | |
| import numpy as np | |
| def enumerate_ANX(oxi_states, max_ratio=8): | |
| ret = [] | |
| for anx in product(range(1, max_ratio + 1), repeat=len(oxi_states)): | |
| if np.sum(np.array(oxi_states) * np.array(anx)) == 0: | |
| ret.append(anx) | |
| return ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment