fixed logic for fast_array_equal

This commit is contained in:
Nicolo Fusi 2013-07-17 17:13:28 +01:00
parent 9e6a98e485
commit 8da0785b26

View file

@ -86,7 +86,11 @@ def fast_array_equal(A, B):
value = False
if A is not None and B is not None and A.shape == B.shape:
if (A == None) and (B == None):
return True
elif ((A == None) and (B != None)) or ((A != None) and (B == None)):
return False
elif A.shape == B.shape:
if len(A.shape) == 2:
N, D = A.shape
value = weave.inline(code, support_code=support_code, libraries=['gomp'],
@ -95,7 +99,6 @@ def fast_array_equal(A, B):
else:
value = np.array_equal(A,B)
return value