From 6945ad7aa14d498d8e6ba4d39029f4cc21a88d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Fusi?= Date: Fri, 11 Oct 2013 16:19:27 -0700 Subject: [PATCH] Seems to work on windows now not everything works yet, but I've identified the main issues. Still TODO: handle missing OMP libraries gracefully --- GPy/util/linalg.py | 4 +++- GPy/util/misc.py | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/GPy/util/linalg.py b/GPy/util/linalg.py index 4e7f7fff..213cd047 100644 --- a/GPy/util/linalg.py +++ b/GPy/util/linalg.py @@ -325,6 +325,7 @@ def symmetrify(A, upper=False): """ N, M = A.shape assert N == M + c_contig_code = """ int iN; for (int i=1; i + // #include #include """ @@ -107,15 +107,17 @@ def fast_array_equal(A, B): return False elif A.shape == B.shape: if A.ndim == 2: - N, D = A.shape - value = weave.inline(code2, support_code=support_code, libraries=['gomp'], + 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) + type_converters=weave.converters.blitz) + # libraries=['gomp'], **weave_options) elif A.ndim == 3: - N, D, Q = A.shape - value = weave.inline(code3, support_code=support_code, libraries=['gomp'], + 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) + type_converters=weave.converters.blitz) + #libraries=['gomp'], **weave_options) else: value = np.array_equal(A,B)