From 3134f52d7da611f8e2a91f8d2f3349338f6dda51 Mon Sep 17 00:00:00 2001 From: James Hensman Date: Tue, 23 Sep 2014 08:43:48 +0100 Subject: [PATCH] removed fast_array_equal (no longer used) --- GPy/util/misc.py | 90 ------------------------------------------------ 1 file changed, 90 deletions(-) diff --git a/GPy/util/misc.py b/GPy/util/misc.py index fa9bb24c..515eb7ef 100644 --- a/GPy/util/misc.py +++ b/GPy/util/misc.py @@ -84,96 +84,6 @@ def kmm_init(X, m = 10): inducing = np.array(inducing) return X[inducing] -def fast_array_equal(A, B): - - - if config.getboolean('parallel', 'openmp'): - pragma_string = '#pragma omp parallel for private(i, j)' - else: - pragma_string = '' - - code2=""" - int i, j; - return_val = 1; - - %s - for(i=0;i - """ % header_string - - - weave_options_openmp = {'headers' : [''], - 'extra_compile_args': ['-fopenmp -O3'], - 'extra_link_args' : ['-lgomp'], - 'libraries': ['gomp']} - weave_options_noopenmp = {'extra_compile_args': ['-O3']} - - if config.getboolean('parallel', 'openmp'): - weave_options = weave_options_openmp - else: - weave_options = weave_options_noopenmp - - value = False - - - 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 A.ndim == 2: - N, D = [int(i) for i in A.shape] - value = weave.inline(code2, support_code=support_code, - arg_names=['A', 'B', 'N', 'D'], - type_converters=weave.converters.blitz, **weave_options) - elif A.ndim == 3: - N, D, Q = [int(i) for i in A.shape] - value = weave.inline(code3, support_code=support_code, - arg_names=['A', 'B', 'N', 'D', 'Q'], - type_converters=weave.converters.blitz, **weave_options) - else: - value = np.array_equal(A,B) - - return value - ### make a parameter to its corresponding array: def param_to_array(*param): """