This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am pspoerri on github. | |
* I am inf (https://keybase.io/inf) on keybase. | |
* I have a public key whose fingerprint is 1FF4 61B8 D73C 9712 FB2E 65AE 89C9 1086 6368 D948 | |
To claim this, I am signing this object: |
This file contains 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
import numpy as np | |
def match_arrays(a, b, threshold=0.0): | |
diff = np.abs(a - b) | |
if diff.min() <= diff.max() and diff.max() <= threshold: | |
return True, "" | |
return False, "abs(a-b): min= {min} max= {max}".format(min=diff.min(), max=diff.max()) | |
def compare_dicts(a, b, fun, ident=""): | |
for k, v in b.items(): |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am minusinf on github. | |
* I am inf (https://keybase.io/inf) on keybase. | |
* I have a public key whose fingerprint is 1FF4 61B8 D73C 9712 FB2E 65AE 89C9 1086 6368 D948 | |
To claim this, I am signing this object: |