mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-05 17:52:39 +02:00
fixed logic for fast_array_equal
This commit is contained in:
parent
9e6a98e485
commit
8da0785b26
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue