Created
October 12, 2017 21:37
-
-
Save previtus/51476095518816d6c87ca9ba19a1fb8f to your computer and use it in GitHub Desktop.
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
a = "/home/ekmek/saliency_tools/models/TEST1.npy" | |
b = "/home/ekmek/saliency_tools/models/TEST2.npy" | |
aval = np.load(a) | |
bval = np.load(b) | |
# lengths | |
print len(aval) | |
print len(bval) | |
for i in range(0,len(aval)): | |
print i, len(aval[i]), len(bval[i]) | |
# one by one (clearer with big arrays) check if they are the same inside, convert to list | |
from deepdiff import DeepDiff | |
for i in range(0,len(aval)): | |
tmp = aval[i] | |
tmp = tmp.tolist() | |
print type(tmp) | |
tmp2 = bval[i] | |
tmp2 = tmp2.tolist() | |
print i, DeepDiff(tmp, tmp2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment