diff --git a/GPy/util/misc.py b/GPy/util/misc.py index 5b3a70da..f931ae6a 100644 --- a/GPy/util/misc.py +++ b/GPy/util/misc.py @@ -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