Use correct cython check in kernel_tests.py

This commit is contained in:
Jayanth Koushik 2017-10-23 16:22:42 -04:00
parent a7af12e6ea
commit 6605b736d8

View file

@ -14,10 +14,10 @@ from ..util.config import config
verbose = 0 verbose = 0
try: try:
from ..util import choleskies_cython from ..kern.src import coregionalize_cython
cython_choleskies_working = True cython_coregionalize_working = True
except ImportError: except ImportError:
cython_choleskies_working = False cython_coregionalize_working = False
class Kern_check_model(GPy.core.Model): class Kern_check_model(GPy.core.Model):
@ -618,7 +618,7 @@ class KernelTestsNonContinuous(unittest.TestCase):
kern = GPy.kern.Coregionalize(1, output_dim=3, active_dims=[-1]) kern = GPy.kern.Coregionalize(1, output_dim=3, active_dims=[-1])
self.assertTrue(check_kernel_gradient_functions(kern, X=self.X, X2=self.X2, verbose=verbose, fixed_X_dims=-1)) self.assertTrue(check_kernel_gradient_functions(kern, X=self.X, X2=self.X2, verbose=verbose, fixed_X_dims=-1))
@unittest.skipIf(not cython_choleskies_working,"Cython choleskies module has not been built on this machine") @unittest.skipIf(not cython_coregionalize_working,"Cython coregionalize module has not been built on this machine")
class Coregionalize_cython_test(unittest.TestCase): class Coregionalize_cython_test(unittest.TestCase):
""" """
Make sure that the coregionalize kernel work with and without cython enabled Make sure that the coregionalize kernel work with and without cython enabled